[ZBX-3986] MySQL server has gone away Created: 2011 Jul 27 Updated: 2017 May 30 Resolved: 2012 Nov 09 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 1.8.5 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Minor |
Reporter: | azurIt | Assignee: | Unassigned |
Resolution: | Won't fix | Votes: | 2 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
Our server is printing error message 'MySQL server has gone away' very frequently (probably cos of quite low wait_timeout in MySQL - 120 secs). I suggest to fix this problem running this statement on start of every MySQL connection: |
Comments |
Comment by Robert Hau [ 2011 Aug 16 ] |
I also see this error message in my logs. At one point we saw this in our logs for several hours, it may have been a local network disconnect, but still very strange. |
Comment by Alexei Vladishev [ 2012 Jul 28 ] |
It has been fixed already in one of the latest 1.8.x. |
Comment by azurIt [ 2012 Oct 25 ] |
still a problem in 2.0.3 |
Comment by Alexei Vladishev [ 2012 Nov 09 ] |
I do not see any problem here. 28800 is the default value for his parameter according to http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout. The warning messages do not harm Zabbix in any way, it re-connects automatically. Besides Zabbix 2.0.x is much quite when it comes to debug messaging. I am closing it. |
Comment by azurIt [ 2012 Nov 10 ] |
Alexei, i really see a problem here (and i'm not alone). We have wait_timeout=120 for various of reasons and are getting 'MySQL server has gone away' message about 1300 times per day. Is it really hard to find any other interesting error messages and logs are becaming useless. Is it really so big deal for you to set wait_timeout at the start of every connection? |
Comment by richlv [ 2012 Nov 10 ] |
could you please list the reasons ? it could help to evaluate how common such configuration could be |
Comment by azurIt [ 2012 Nov 10 ] |
The main reason is that we have lots of MySQL users and were having big problems with connection limit with default wait_timeout configuration - many users and applications are just dump and are not closing connections correctly. There were 100s of already unused connections in sleep state. Raising the connection limit was not a solution here, we just needed to get rid of unused connections and wait_timeout was the thing which fixed that. |