Ad Widget

Collapse

MySQL server has gone away

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jdurand
    Junior Member
    • Feb 2011
    • 1

    #1

    MySQL server has gone away

    I recently upgraded from 1.8.1 to 1.8.4, easy enough, I noticed the night after the upgrade I got bombarded with fail/pass alerts for all my agent.ping.nodata(180) that I setup (as I gave up on trying to make Host Status work for me). The agent.ping.nodata alerts were working fine and would rarely go off in the middle of the night, until 1.8.4, but I am not sure that was the cause. Anyway, now my server log gets filled with MySQL server has gone away failed SQL queries that run just fine when I manually run them with the zabbix user, here is a snippet from my log:

    28442:20110224:132037.387 [Z3005] Query failed: [2006] MySQL server has gone away [begin;]
    28446:20110224:132052.268 [Z3005] Query failed: [2006] MySQL server has gone away [begin;]
    28467:20110224:132100.876 [Z3005] Query failed: [2006] MySQL server has gone away [select distinct t.triggerid,t.type,t.value,t.error,t.expression from triggers t,functions f,items i,hosts h where t.status=0 and t.triggerid=f.triggerid and f.function in ('nodata','date','dayofweek','time','now') and f.itemid=i.itemid and i.status=0 and i.hostid=h.hostid and h.status=0 and (h.maintenance_status=0 or h.maintenance_type=0) and h.hostid between 000000000000000 and 099999999999999]
    28440:20110224:132123.620 [Z3005] Query failed: [2006] MySQL server has gone away [select i.itemid,i.hostid,h.proxy_hostid,i.type,i.data_typ e,i.value_type,i.key_,i.snmp_community,i.snmp_oid, i.snmp_port,i.snmpv3_securityname,i.snmpv3_securit ylevel,i.snmpv3_authpassphrase,i.snmpv3_privpassph rase,i.ipmi_sensor,i.delay,i.delay_flex,i.trapper_ hosts,i.logtimefmt,i.params,i.status,i.authtype,i. username,i.password,i.publickey,i.privatekey from items i,hosts h where i.hostid=h.hostid and h.status in (0) and i.status in (0,3) and i.itemid between 000000000000000 and 099999999999999]
    28467:20110224:132130.889 [Z3005] Query failed: [2006] MySQL server has gone away [select distinct t.triggerid,t.type,t.value,t.error,t.expression from triggers t,functions f,items i,hosts h where t.status=0 and t.triggerid=f.triggerid and f.function in ('nodata','date','dayofweek','time','now') and f.itemid=i.itemid and i.status=0 and i.hostid=h.hostid and h.status=0 and (h.maintenance_status=0 or h.maintenance_type=0) and h.hostid between 000000000000000 and 099999999999999]


    Please help!

    Thank you.
  • marcel
    Senior Member
    Zabbix Certified Specialist
    • Oct 2010
    • 112

    #2
    check the number of mysql processes with

    select processlist;

    whether some of the processes are not running too long for other check data to be inserted into the database.

    increase the number of zabbix server instances - that will open up more mysql connections - also make sure you have enough max_connections set in mysql config

    marcel
    Zabbix Certified Specialist for Large Environments since 12/2010

    Comment

    Working...