Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have been repeatedly facing the issues with mysql on my server recently. I have tried changing "wait_timeout" , "connect_timeout" and several options which I found using google. Are there any methods / tools that I can use to debug these issues. I tried looking at connections, max_connections.

Any ideas would be great, I am accessing the mysql server using a Background PHP job, which accesses the mysql server every 5 seconds.

share|improve this question
    
What are your current settings for max_allowed_packet, read_buffer_size, and read_rnd_buffer_size ? –  RolandoMySQLDBA Jun 9 '12 at 20:04
add comment

1 Answer

Try increasing max_allowed_packet size you may get rid of these errors. Please refer these links may be helpful in debugging this issue:

http://www.webyog.com/blog/2009/08/10/mysql-server-has-gone-away-part-1-max_allowed_packet/

http://www.webyog.com/blog/2009/09/02/%E2%80%9Cmysql-server-has-gone-away%E2%80%9D-part-2-session-timeout/

share|improve this answer
    
Thanks, already looked at those, not getting Error 2020 (CR_NET_PACKET_TOO_LARGE) , just getting Error 2006, mysql server has gone away. –  Rishav Rastogi Jun 9 '12 at 9:00
    
If your server gets restarted after this error then You can refer this mysql.rjweb.org/doc.php/memory also there are so many issues related to this which are in MySQL forum which remained unanswered :-( –  Mahesh Patil Jun 9 '12 at 10:55
    
I just changed the connect_timeout in mysql and socket_timeout in php, will continue to monitor. The issue is the site continues to work fine with the same mysql server, while the background job fails continously, I suspect its related to multiple child threads having stale connections to mysql.Thanks for that link though, much appreciated. –  Rishav Rastogi Jun 9 '12 at 12:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.