Missing events, "MySQL server has gone away" error
Posted: Mon Jul 02, 2007 7:41 am
I have installed version 1.22.3 onto a Debian etch system using the package available in unstable.
The system has been regularly missing events, often the first of the day. The error messages in syslog are :
Jun 29 06:53:39 bammon zma_m3[10586]: ERR [Can't insert event: MySQL server has gone away]
This error appears to be due to the first mysql_query() in zm_events.cpp failing. On my installation I have been able to prevent these failures by increasing the mysql connection timeout dramatically. Adding a line in mysqld section of the my.cnf file, changing the wait_timeout value from the default of 28800 (eight hours) to 31536000 (one year) :
wait_timeout = 31536000
Whether this will have any undesirable side effects remains to be seen. Would a more proper solution be to retry this mysql_query() (and any others in the rest of the source) in the event of a timeout to reestablish the connection?
Regards, Neil
The system has been regularly missing events, often the first of the day. The error messages in syslog are :
Jun 29 06:53:39 bammon zma_m3[10586]: ERR [Can't insert event: MySQL server has gone away]
This error appears to be due to the first mysql_query() in zm_events.cpp failing. On my installation I have been able to prevent these failures by increasing the mysql connection timeout dramatically. Adding a line in mysqld section of the my.cnf file, changing the wait_timeout value from the default of 28800 (eight hours) to 31536000 (one year) :
wait_timeout = 31536000
Whether this will have any undesirable side effects remains to be seen. Would a more proper solution be to retry this mysql_query() (and any others in the rest of the source) in the event of a timeout to reestablish the connection?
Regards, Neil