Database error 2006 while doing query MySQL server has gone

Solutions for other phpList version 2 users
Forum rules
Please do not ask questions here, this is for Solutions you have discovered or come across.

Postby database error » 8:46am, Thu 24 May, 2007

I did receive back a message from godaddy techs which states;
Discussion Notes
Support Staff Response

On shared hosting servers, daily email limits are set a 1000 per 24 hour period. If you are still experiencing the issue after 24 hours please let us and know and attach the full error log as you have done previously.

Please let us know if we can assist you in any other way.

Online Support Representative
Customer Inquiry

So, perhaps it is just a simple matter of reaching one's limit with them?
database error
phpList newbie
 
Posts: 2
Joined: 6:13am, Thu 24 May, 2007

Postby westwood » 5:48pm, Thu 24 May, 2007

I've got the same problem, I also use GoDaddy's shared hosting, but my mailing list is small - less than 50 addresses - so I don't think the problem has anything to do with exceeding GoDaddy's 1000 messages per day limit.

Also, I've found if I suspend sending, login again, requeue the message and process the queue, then it seems one more message is sent before the errors occur.

I hope someone finds a solution soon.
westwood
phpList newbie
 
Posts: 2
Joined: 5:41pm, Thu 24 May, 2007

One change fixed the problem for me

Postby westwood » 6:02pm, Fri 25 May, 2007

I changed the line in config/config.php from:

define('MAILQUEUE_THROTTLE',60);

to

define('MAILQUEUE_THROTTLE',1);

and this fixed the problem for me.

I got a clue by reading the following that I found on

http://mantis.phplist.com/print_bug_page.php?bug_id=8905:

{0022456)
satyrvs
11-01-07 15:40

Michiel, have new info, sorry! And i think that is the problem

The ISP told: the mysql server drop any querie inactive for 10 seconds, also they told that feature cannot be changed for security reasons and cause it's a shared hosting. They told also that "a script that is inactive for 10 seconds is bad programming" :S

I also try the trick with multiple db users and didn't work.
westwood
phpList newbie
 
Posts: 2
Joined: 5:41pm, Thu 24 May, 2007

Postby nandoe » 5:56pm, Fri 23 May, 2008

I had the same problem today, running phplist on server1 and the database on another server.

This solved the problem:

my.cnf:

set-variable = wait_timeout=60

upgraded to

set-variable = wait_timeout=120
nandoe
PL Nut
 
Posts: 24
Joined: 3:24pm, Wed 19 May, 2004
Location: Ede, The Netherlands

Postby gerbert » 8:08am, Wed 04 Jun, 2008

nandoe wrote:I had the same problem today, running phplist on server1 and the database on another server.

This solved the problem:

my.cnf:

set-variable = wait_timeout=60

upgraded to

set-variable = wait_timeout=120


Are those MySQL variables? I wish I could do that, my host won't change it. Here's what they say:

the script assumes that it can stay connected to the mysql server for hours on end. A modification of the script is necessary to handle the error condition when the connection to the db times out.
You have 2 options:
1) Get updated version of the software.
2)Get a php programmer to add an exception handler for the phplist script to automatically reconnect to the db, when it times out.


Anybody have any suggestions? I am using version 2.10.5. Thanks. I've been battling this timeout issue for awhile now.
gerbert
phpLister
 
Posts: 9
Joined: 11:28pm, Sat 18 Aug, 2007

Postby eye » 2:56pm, Sat 21 Jun, 2008

I was getting this same error after it sent out to around 250ish people on a list with 1700 people. I am on shared hosting at 1and1 so i couldn't really mess with to many settings as far as SQL. My first phplist install was on mySQL 5 and i kept getting the error so i reinstalled with mySQL 4 and it still did the same thing. So i did some testing and got like 500 random invalid email addys, made a new list and sent it out and it worked fine. My problem ended up being a "bad" email address that phplist was hanging on when trying to send i deleted the entry and it is working now.
eye
phpList newbie
 
Posts: 1
Joined: 2:44pm, Sat 21 Jun, 2008

Postby flowpena » 11:35am, Thu 03 Jul, 2008

all lists are on phplist, all has been running smoothly, suddently 1 day ago this has happened... batch processing is fine, 400 emails per hour(due to my server limits)

NEED HELP URGENTLY


Database error 2006 while doing query MySQL server has gone away
No lists available, use Add to add one

---when i process queue =

Started
Sending in batches of 400 emails
Processing has started, 1 message(s) to process.
Please leave this window open. You have batch processing enabled, so it will reload several times to send the messages. Reports will be sent by email to news@flowvinyl.com
Processing message 13
Looking for users
Found them: 0 to process
Processed 0 out of 0 users
Hmmm, No users found to send to
It took 2 mins 24 secs to send this message
Script stage: 3
Finished, Nothing to do
Finished, All done
flowpena
phpLister
 
Posts: 13
Joined: 11:30am, Thu 03 Jul, 2008

Postby Dragonrider » 7:07pm, Thu 03 Jul, 2008

MySQL Server gone away could be a host issue, suggest you raise trouble ticket with your host, or if you have cPanel, check you can still see your database(s). If you can, try the list again, it may have been an intermitten issue.
My sites:- http://wharfedalefestival.co.uk, http://ilkleygardeners.org.uk, http://emergencyaid.net, http://dragonrider.co.uk
Latest phpList version is now 3.0.12 (3 February 2015) and requires a minimum of MySQL 5.0 and PHP 5.3.x
Dragonrider
Moderator
 
Posts: 3460
Joined: 6:58am, Sun 02 Jul, 2006
Location: Ilkley, West Yorkshire, United Kingdom

Postby Guest » 11:48am, Fri 03 Oct, 2008

nandoe wrote:I had the same problem today, running phplist on server1 and the database on another server.

This solved the problem:

my.cnf:

set-variable = wait_timeout=60

upgraded to

set-variable = wait_timeout=120


It worked for me too. Fast and easy. Thanks!
Guest
 

Re: Database error 2006 while doing query MySQL server has gone

Postby NYChris » 10:30am, Thu 08 Apr, 2010

You are ALL taking the wrong approach to solving this.
I'm using PHPList 2.10.10 & MySql 5 on a VPS for one of my clients.
We send over 400,000 emails per week to 120,000 addresses at a rate of 7,000 per hour.

The issue is with the database itself. And it's caused by PHPList not planning for this to happen.
The wrong approach is to compensate for the database problem.
The right approach is to fix the database problem.

The problem is that over time the database becomes fragmented... really fragmented. And this slows down the queries more and more.
I simply defragged it and it ran much better. It took about 20 minutes.
Then I allowed more ram for the tables and now it's running like a brand new system on steroids.


I think PHPList should have a DB-Defrag feature incorporated into the database check page to prevent this in the future.
I also think the default page for logging on to the admin panel should be the DB Check page.

I hope this approach fixes the problems for all of you.
NYChris
PL Geek
 
Posts: 59
Joined: 4:55pm, Mon 29 Jun, 2009

Re: Database error 2006 while doing query MySQL server has gone

Postby stainelyjohnson » 7:56am, Tue 25 May, 2010

i am using PHPlist version 2.10.3 ....and i encountered the same problem ....i received database error when i send a message for queue processing ......
thanks for any help
...........................
stainelyjohnson
phpList newbie
 
Posts: 1
Joined: 7:31am, Tue 25 May, 2010

Re: Database error 2006 while doing query MySQL server has gone

Postby snyperthugs » 6:42am, Wed 26 May, 2010

This is what my host told me

If you experience MySQL timeouts, it's possible you are using heavy or very long MySQL queries. Please try using mysql_reconnect command before each query, and everything should be fine.



OK IM A NOOB! I have no idea what he's telling me to do :( Any help?? Where do I put this "mysql_reconnect"



Hello? :(
snyperthugs
phpLister
 
Posts: 6
Joined: 6:58am, Tue 13 May, 2008

Re: Database error 2006 while doing query MySQL server has gone

Postby NYChris » 3:04pm, Wed 26 May, 2010

Call your ISP and ask them to do what I said in my previous post.
NYChris
PL Geek
 
Posts: 59
Joined: 4:55pm, Mon 29 Jun, 2009

Re: Database error 2006 while doing query MySQL server has gone

Postby creabel » 12:38pm, Wed 26 Jan, 2011

Hi,

In my case, I can't change the MySQL config file.

Is it an other solution to resolve this problem?

Thanks!

Christophe
creabel
phpList newbie
 
Posts: 2
Joined: 12:18pm, Wed 26 Jan, 2011

Re: Database error 2006 while doing query MySQL server has gone

Postby NYChris » 4:13pm, Thu 10 Feb, 2011

At least optimize (defrag) your MySql tables. It will make your program run faster and cause less time outs.
Use phpmyadmin (unless you have something better) and run these queries one at a time and wait for each to finish before running the next.
If you don't wait, you may corrupt the database.
Some of these are slower than others.
Code: Select all
OPTIMIZE TABLE phplist_admin;
OPTIMIZE TABLE phplist_admin_attribute;
OPTIMIZE TABLE phplist_admin_task;
OPTIMIZE TABLE phplist_adminattribute;
OPTIMIZE TABLE phplist_attachment;
OPTIMIZE TABLE phplist_bounce;
OPTIMIZE TABLE phplist_bounceregex;
OPTIMIZE TABLE phplist_bounceregex_bounce;
OPTIMIZE TABLE phplist_config;
OPTIMIZE TABLE phplist_eventlog;
OPTIMIZE TABLE phplist_linktrack;
OPTIMIZE TABLE phplist_linktrack_userclick;
OPTIMIZE TABLE phplist_list;
OPTIMIZE TABLE phplist_listattr_countries;
OPTIMIZE TABLE phplist_listmessage;
OPTIMIZE TABLE phplist_listrss;
OPTIMIZE TABLE phplist_listuser;
OPTIMIZE TABLE phplist_message;
OPTIMIZE TABLE phplist_message_attachment;
OPTIMIZE TABLE phplist_messagedata;
OPTIMIZE TABLE phplist_rssitem;
OPTIMIZE TABLE phplist_rssitem_data;
OPTIMIZE TABLE phplist_rssitem_user;
OPTIMIZE TABLE phplist_sendprocess;
OPTIMIZE TABLE phplist_subscribepage;
OPTIMIZE TABLE phplist_subscribepage_data;
OPTIMIZE TABLE phplist_task;
OPTIMIZE TABLE phplist_template;
OPTIMIZE TABLE phplist_templateimage;
OPTIMIZE TABLE phplist_urlcache;
OPTIMIZE TABLE phplist_user_attribute;
OPTIMIZE TABLE phplist_user_blacklist;
OPTIMIZE TABLE phplist_user_blacklist_data;
OPTIMIZE TABLE phplist_user_message_bounce;
OPTIMIZE TABLE phplist_user_message_forward;
OPTIMIZE TABLE phplist_user_rss;
OPTIMIZE TABLE phplist_user_user;
OPTIMIZE TABLE phplist_user_user_attribute;
OPTIMIZE TABLE phplist_user_user_history;
OPTIMIZE TABLE phplist_usermessage;
OPTIMIZE TABLE phplist_userstats;
NYChris
PL Geek
 
Posts: 59
Joined: 4:55pm, Mon 29 Jun, 2009

PreviousNext

Return to Answers, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 2 guests