[ZBX-7793] Zabbix doesn't alter mySQL wait_timeout for it's sessions Created: 2014 Feb 12 Updated: 2017 May 30 Resolved: 2014 Feb 13 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.2.1 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Major |
Reporter: | Timur Bakeyev | Assignee: | Unassigned |
Resolution: | Duplicate | Votes: | 0 |
Labels: | database, timeout | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
LSB Version: core-2.0-amd64:core-2.0-noarch:core-3.0-amd64:core-3.0-noarch:core-3.1-amd64:core-3.1-noarch:core-3.2-amd64:core-3.2-noarch:core-4.0-amd64:core-4.0-noarch:core-4.1-amd64:core-4.1-noarch:security-4.0-amd64:security-4.0-noarch:security-4.1-amd64:security-4.1-noarch |
Issue Links: |
|
Description |
I'm not sure, is this really a case, as I've experience it on a production server and had to revert everything back very soon. So, I've pointed zabbix from the local mySQL to out production mySQL cluster, which has better performance, memory, etc. But, as it is used by a lot of scripts and programs, which sometimes don't behave nice, it has in mySQL configuration following options: wait_timeout = 30 After restart of the Zabbix server I've started to see messages in the log like: 27033:20140212:050417.071 server #23 started discoverer #5 While mySQL server was up and running and Zabbix itself was working kind of OK. So, based on 'MySQL server has gone away' I assumed that this is connected with 'wait_timeout' and raised it to 900. After restart number of such messages decreased dramatically: 27017:20140212:082321.399 [Z3005] query failed: [2006] MySQL server has gone away [select hostid,key_,state,filter,error,lifetime from items where itemid=26601] But still occur from time to time. Now I raised wait_timeout to 28800(default mySQL value), but that of course breaks usage patter of the server. Have to observe logs to gather statistics though. Meanwhile If I'm right, and this behavior caused by low global wait_timeout, the fix for it is quite simple - at the beginning of the mySQL session, when zabbix connects to it the first SQL statement should be: SET SESSION wait_timeout=84600 or whatever looks appropriate. That would make zabbix independent from global server setting and will help it to keep idle connections for log periods open. With regards, |
Comments |
Comment by Aleksandrs Saveljevs [ 2014 Feb 13 ] |
Timur, thank you for the detailed description. However, the issue is a duplicate of |