Ad Widget

Collapse

[4031] client was disconnected by server - timeout after 120 seconds

Collapse
This topic has been answered.
X
X
 
  • Time
  • Show
Clear All
new posts
  • siegmarb
    Junior Member
    • Nov 2014
    • 25

    #1

    [4031] client was disconnected by server - timeout after 120 seconds

    Hi folks,

    we are running zabbix 5 LTS with MariaDB and exactly 2 minutes after zabbix-server start, we have many entries

    Code:
    [Z3005] query failed: [4031] The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior. [select h.hostid,h.status,h.tls_accept,h.tls_issuer,h.tls_ subject,h.tls_psk_identity,a.host_metadata,a.liste n_ip,a.listen_dns,a.listen_port,a.flags from hosts h left join autoreg_host a on a.proxy_hostid is null and a.host=h.host where h.host='notebook' and h.status in (0,1) and h.flags<>2 and h.proxy_hostid is null]
    [Z3005] query failed: [4031] The client was disconnected by the server because of inactivity. See wait_timeout and interactive_timeout for configuring this behavior. [begin;]
    in our log.

    it looks like the obvious but it is not

    Code:
    mysql> show variables like 'wait_timeout';
    +---------------+-------+
    | Variable_name | Value |
    +---------------+-------+
    | wait_timeout | 28800 |
    +---------------+-------+
    1 row in set (0,00 sec)
    
    mysql> show variables like 'interactive_timeout';
    +---------------------+-------+
    | Variable_name | Value |
    +---------------------+-------+
    | interactive_timeout | 28800 |
    +---------------------+-------+
    1 row in set (0,00 sec)
    We tried to tune almost everything that can be tweaked without any change.

    Any help is greatly appreciated.

    Thanks.

    Siegmar
  • Answer selected by siegmarb at 27-01-2022, 08:57.
    siegmarb
    Junior Member
    • Nov 2014
    • 25

    Well, the problem was on the DB side. Even though the mysql show command shows the "right" values, these are only the default values from mysql.
    So we checked all additional configuration files and found in one included mysql configuration the 120 seconds... DOH!
    Sorry for the noise.

    Comment

    • siegmarb
      Junior Member
      • Nov 2014
      • 25

      #2
      Well, the problem was on the DB side. Even though the mysql show command shows the "right" values, these are only the default values from mysql.
      So we checked all additional configuration files and found in one included mysql configuration the 120 seconds... DOH!
      Sorry for the noise.

      Comment

      • TheoViset
        Junior Member
        • Jan 2023
        • 1

        #3
        Hi Siegmar,

        we have the same problem, the settings for wait_ and interactive_ timeouts are still the defaults:


        mysql> show variables like '%timeout%';
        +-----------------------------------+----------+
        | Variable_name | Value |
        +-----------------------------------+----------+
        | connect_timeout | 10 |
        | delayed_insert_timeout | 300 |
        | have_statement_timeout | YES |
        | innodb_flush_log_at_timeout | 1 |
        | innodb_lock_wait_timeout | 50 |
        | innodb_rollback_on_timeout | OFF |
        | interactive_timeout | 28800 |
        | lock_wait_timeout | 31536000 |
        | mysqlx_connect_timeout | 30 |
        | mysqlx_idle_worker_thread_timeout | 60 |
        | mysqlx_interactive_timeout | 28800 |
        | mysqlx_port_open_timeout | 0 |
        | mysqlx_read_timeout | 30 |
        | mysqlx_wait_timeout | 28800 |
        | mysqlx_write_timeout | 60 |
        | net_read_timeout | 30 |
        | net_write_timeout | 60 |
        | replica_net_timeout | 60 |
        | rpl_stop_replica_timeout | 31536000 |
        | rpl_stop_slave_timeout | 31536000 |
        | slave_net_timeout | 60 |
        | ssl_session_cache_timeout | 300 |
        | wait_timeout | 28800 |
        +-----------------------------------+----------+
        23 rows in set (0.00 sec)

        mysql> show global variables like '%timeout%';
        +-----------------------------------+----------+
        | Variable_name | Value |
        +-----------------------------------+----------+
        | connect_timeout | 10 |
        | delayed_insert_timeout | 300 |
        | have_statement_timeout | YES |
        | innodb_flush_log_at_timeout | 1 |
        | innodb_lock_wait_timeout | 50 |
        | innodb_rollback_on_timeout | OFF |
        | interactive_timeout | 28800 |
        | lock_wait_timeout | 31536000 |
        | mysqlx_connect_timeout | 30 |
        | mysqlx_idle_worker_thread_timeout | 60 |
        | mysqlx_interactive_timeout | 28800 |
        | mysqlx_port_open_timeout | 0 |
        | mysqlx_read_timeout | 30 |
        | mysqlx_wait_timeout | 28800 |
        | mysqlx_write_timeout | 60 |
        | net_read_timeout | 30 |
        | net_write_timeout | 60 |
        | replica_net_timeout | 60 |
        | rpl_stop_replica_timeout | 31536000 |
        | rpl_stop_slave_timeout | 31536000 |
        | slave_net_timeout | 60 |
        | ssl_session_cache_timeout | 300 |
        | wait_timeout | 28800 |
        +-----------------------------------+----------+
        23 rows in set (0.00 sec)

        but the connection between MySQL and our application is closed every app. 43 to 45 minutes.
        Can you please share which included configuration file you edited to solve your issue?

        Thanks in advance,
        greetz, Theo

        Comment

        Working...