Ad Widget

Collapse

mysql server has gone away

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • johntest
    Junior Member
    • Mar 2015
    • 14

    #1

    mysql server has gone away

    hi folks

    this one is becoming a really annoying issue

    here is the setup
    zabbix connects to mysql via haproxy which resides locally on zabbix
    mysql server is remote but on same network
    everything is on same virtual network under vmware. same subnet etc.

    Error
    18172:20150806:191330.662 [Z3005] query failed: [2006] MySQL server has gone away [select hostid,status from hosts where host='Zabbix server' and status in (0,1) and flags<>2 and proxy_hostid is null]

    Now in this case host "Zabbix server" does not exist. Or rather I renamed the host and changed the IP etc so its called "DC1 zabbix server".

    haproxy.cfg (generous timeout settings)
    retries 3
    timeout queue 45s
    timeout connect 60s
    timeout client 5m
    timeout server 5m
    timeout check 30s
    maxconn 1020

    ## on mysql server
    /etc/my.cnf
    wait_timeout = 28000
    max_allowed_packet = 64M
    max_connections = 512
    join_buffer_size=300
    table_open_cache=2500
    innodb_buffer_pool_instances=1
    innodb_buffer_pool_size=2G
    query_cache_type=1
    query_cache_size=128M

    ## zabbix_server.conf
    CacheSize = 128M
    Timeout=30
    Timeout=29 (on agent node)
    ValueCacheSize=128M
    StartPollers=100
    StartDBSyncers = 8

    A related question:
    If this issue happens and zabbix d/c with mysql. Does it re estalish connection immediatley without data loss?

    So any ways to fix this? Would this cause any issues around losing monitoring data? How can we fix it ?

    Thank you!
    Last edited by johntest; 07-08-2015, 01:21.
Working...