MySQL error: server has gone away

asked May 9, 2012 in Database by ross (850 points)
hi all
I am using PHP/MYSQL based script on my LAN web server. Every time I start my script I get the error message:
Warning: mysql_pconnect() [<a href='function.mysql-pconnect'>function.mysql-pconnect</a>]: MySQL server has gone away in E:\Server\vt\adodb\drivers\ on line 373

And then after a little while the error disappears

Can anyone help me fix this error please?
Thanks in advance

2 Answers

0 like 0 dislike
answered May 9, 2012 by WebGuru (9,280 points)
check mysql logs for this and try to increase timeout.
0 like 0 dislike
answered May 9, 2012 by expert (14,380 points)
hi there
Adjust the wait_timeout variable in /etc/my.cnf and restart mysql.
this url should help