What´s this error?
It appears randomly...!

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>MySQL server has gone away\nquery: LOCK TABLES cache_page WRITE</em> en la línea <em>172</em> del archivo <em>/home/planetac/public_html/includes/database.mysql.inc</em>.', 2, '', 'http://www.planetaconsorcio.com/', 'http://www.planetaconsorcio.com/user/76/edit', '200.122.115.187', 1204484718) in /home/planetac/public_html/includes/database.mysql.inc on line 172

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em></em> en la línea <em>172</em> del archivo <em>/home/planetac/public_html/includes/database.mysql.inc</em>.', 2, '', 'http://www.planetaconsorcio.com/', 'http://www.planetaconsorcio.com/user/76/edit', '200.122.115.187', 1204484718) in /home/planetac/public_html/includes/database.mysql.inc on line 172

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>MySQL server has gone away\nquery: UNLOCK TABLES</em> en la línea <em>172</em> del archivo <em>/home/planetac/public_html/includes/database.mysql.inc</em>.', 2, '', 'http://www.planetaconsorcio.com/', 'http://www.planetaconsorcio.com/user/76/edit', '200.122.115.187', 1204484718) in /home/planetac/public_html/includes/database.mysql.inc on line 172

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>MySQL server has gone away\nquery: INSERT INTO accesslog (title, path, url, hostname, uid, sid, timer, timestamp) values(&amp;#039;&amp;#039;, &amp;#039;node&amp;#039;, &amp;#039;http://www.planetaconsorcio.com/user/76/edit&amp;#039;, &amp;#039;200.122.115.187&amp;#039;, 0, &amp;#039;aea730725310fbdd67b9355d86ed6513&amp;#039;, 43293, 1204484718)</em> en la línea <em>172</em> del archivo <em>/home/planetac/public_html/includes/database.mysql.inc</em>.', 2, '', 'http://www.planetaconsorcio.com/', 'http://www.planetaconsorcio.com/user/76/edit', '200.122.115.187', 1204484718) in /home/planetac/public_html/includes/database.mysql.inc on line 172

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>MySQL server has gone away\nquery: SELECT sid FROM sessions WHERE sid = &amp;#039;aea730725310fbdd67b9355d86ed6513&amp;#039;</em> en la línea <em>172</em> del archivo <em>/home/planetac/public_html/includes/database.mysql.inc</em>.', 2, '', 'http://www.planetaconsorcio.com/', 'http://www.planetaconsorcio.com/user/76/edit', '200.122.115.187', 1204484718) in /home/planetac/public_html/includes/database.mysql.inc on line 172

Warning: MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '<em>MySQL server has gone away\nquery: INSERT INTO sessions (sid, uid, cache, hostname, session, timestamp) VALUES (&amp;#039;aea730725310fbdd67b9355d86ed6513&amp;#039;, 0, 0, &amp;#039;200.122.115.187&amp;#039;, &amp;#039;messages|a:1:{s:5:\\&amp;quot;error\\&amp;quot;;a:4:{i:0;s:147:\\&amp;quot;user warning: MySQL server has gone away\\nquery: LOCK TABLES cache_page WRITE in /home/planetac/public_html/includes/database.mysql.inc on line 172.\\&amp;quot;;i:1;s:85:\\&amp;quot;user warning: in /home/planetac/public_html/includes/database.mysql.inc on line 172.\\&amp;quot;;i:2;s:132:\\&amp;quot;user warning: MySQL server has gone away\\nquery: UNLOCK TABLES in /home/planetac/public_html/includes/database.mysql.inc on line 172.\\&amp;quot;;i:3;s:391:\\&amp;quot;user warning: MySQL server in /home/planetac/public_html/includes/database.mysql.inc on line 172

I would really, really, really appreciate any help.
Thanks!!!
Rosamunda

Comments

vinayras’s picture

Hi,

This is MySQL server issue. Talk to you host - he will get it sorted.

This problem usually occurs when MySQL is not able to respond to requests - either mysql is dead or too busy

g76’s picture

this worked for me. I am on a shared hosting account, no access to mysql settings(max_allowed_packet or timeout settings), but this seemed to fix it:

http://drupal.org/node/227445#comment-770663

also, disable syslog and database logging.
gideon

Rosamunda’s picture

Yeap, it solved the issue for me too.

Rosamunda
Buenos Aires | Argentina
www.ligadelconsorcista.org

darumaki’s picture

So I guess the easy solution would be just to disable everything, including drupal, that will fix it all right (sarcasm). Shouldn't database logging be enabled how else will you know about the errors.

>>>>>>>>>>>>>>>>>>>>>>>
contemplating the meaning of existence, what else would I be doing

tiwiex’s picture

I was begining to think I has broken something. Phew. I did not see where to disable the my sql log anyway. But the syslog did it for me.

laxman.ghavte’s picture

This fixed the problem I was having on local server.

franz2108’s picture

deleted

Stomper’s picture

I was having the same issues with my installation. But was able to fix it using this guide (http://drupal.org/node/259580) I was creating new custom content types and the issue started cropping up. I am running D6.19 on XAMPP localhost on an Windows XP machine.

Warning: MySQL server has gone away query: INSERT INTO watchdog...

My MySQL config file was located at "C:\xampp\mysql\bin\my.ini". Anyways, I checked the values, in my instance the "max_allowed_packet" was only set to 1M (wow). So I changed the value to 200M, restarted XAMPP and the issue seemed to be fixed.

Hope this helps anyone out with a similar situation as me.

Cheers.

ikeigenwijs’s picture

thx

cata.vancea’s picture

this fix also my problem on my localhost.
thx !

alagu98’s picture

Thanks its works ...

rakesh.drupal’s picture

Thanks.....

dewancodes’s picture

hi,
I have this same issue at my local host. Other databases working fine on local , but not this website that contains error for MySQL server has gone away query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (1, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\"....

Dewan

corbin’s picture

i understand that when you are on a mutualised server, the solution for this problem is to change for a dedicated server and modify the php.ini ?

CC

balakumarjayapal’s picture

If you are in shared hosting then go to public html folder
you can find php.ini, and then edit
the mysql.default_timeout =60
change it to 120 or more

and also change the max_execution_time=30
change it to 500 or more

aroranitesh’s picture

This should help

http://drupal.org/node/259580

[mysqld]

port = 3306
socket = /tmp/mysql.sock
skip-locking
key_buffer = 384M
max_allowed_packet = 64M
table_cache = 4096
sort_buffer_size = 2M
read_buffer_size = 2M
read_rnd_buffer_size = 64M
myisam_sort_buffer_size = 64M
thread_cache_size = 8
query_cache_size = 32M