PDA

View Full Version : database error


rd3500
10-25-2009, 01:00 PM
I just got this, something I should be concerned? I think it happened while somebod was trying to attach a picture to a discussion...

Database error in vBulletin 3.8.1:

Invalid SQL:

UPDATE session
SET lastactivity = 1256478400, location = '/ddc1/attachment.php?attachmentid=86&d=1256476678', incalendar = 0, badlocation = 0, useragent = 'Mozilla/5.0 (Windows; U; Windows NT 6.0; it; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)'
WHERE sessionhash = '33dc9c164a229cc62e7acdb7e6a10e49';

MySQL Error : MySQL server has gone away
Error Number : 2006
Request Date : Sunday, October 25th 2009 @ 02:46:40 PM
Error Date : Sunday, October 25th 2009 @ 02:47:22 PM

HMBeaty
10-25-2009, 01:16 PM
That is an issue with your server. You need to contact your host about this problem

TurkeySub
10-26-2009, 01:56 AM
That is an issue with your server. You need to contact your host about this problem

To clarify that point, it is either because you are actively using more connections to the MySQL server than your allowed or you are connected to the MySQL server longer than allowed.

If you are on a shared web hosting server, most likely this will not be something they will change as you are growing outside the shared web hosting, time for a VPS or dedi.

snakes1100
10-26-2009, 03:38 AM
To clarify that point, it is either because you are actively using more connections to the MySQL server than your allowed or you are connected to the MySQL server longer than allowed.

If you are on a shared web hosting server, most likely this will not be something they will change as you are growing outside the shared web hosting, time for a VPS or dedi.

To clarify your answer, if he was using to many connections, why is he not experiencing a error such as "max_connections" limit error, unfortanately, you can NOT use more connections that the server allows.

To try and help combat this issue, you should adjust the 1st of the two variables in my.cnf/my.ini & HUP sql.

wait_timeout = 120 (adjust this in multiples of 60 until the error stops.)
connect_timeout = 120

The above is NOT a fix, there are most likely issues with your coding/programs using & not closing connections or bad indexes or slow queries, these need to be looked at & corrected.

muratmunich
10-26-2009, 07:21 AM
Do you get this error only when attaching something ?

Is this a 64Bit Server ?

TurkeySub
10-26-2009, 09:25 AM
To clarify your answer, if he was using to many connections, why is he not experiencing a error such as "max_connections" limit error, unfortanately, you can NOT use more connections that the server allows.

To try and help combat this issue, you should adjust the 1st of the two variables in my.cnf/my.ini & HUP sql.

wait_timeout = 120 (adjust this in multiples of 60 until the error stops.)
connect_timeout = 120

The above is NOT a fix, there are most likely issues with your coding/programs using & not closing connections or bad indexes or slow queries, these need to be looked at & corrected.

Good point and that brings me to another item. If the file you are trying to attach is larger than the max_packet_size in your my.cnf it will also fail to upload.

The easiest way may be to change your attachments to use the file system as opposed to the sql server, it would lead to a smaller sql DB and less work on the DB server.

snakes1100
10-26-2009, 02:56 PM
If it is a max_packet issue, the site should display the DB error page, as well as generate a email as long as he set his email up in config.php.

TurkeySub
10-26-2009, 07:58 PM
If it is a max_packet issue, the site should display the DB error page, as well as generate a email as long as he set his email up in config.php.

Yep, just throwing it out there as it is an issue I have seen many people run into.