Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21101

Clients run into wait_timeout while waiting for a free thread with pool-of-threads

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3.20, 10.4.10
    • 10.3.24, 10.4.14, 10.5.5
    • Server
    • None
    • Linux

    Description

      When using pool-of-threads, clients that have their latest query still in the thread pool queue, waiting for a free execution thread, do not have that query shown in the SHOW PROCESSLIST output, instead they show with State: Sleep.

      Apparently they are also considered idle by the server itself, as after a query has been waiting in the thread pool queue for more than wait_timeout seconds the connection gets terminated with a timeout message in the servers error log stating a read timeout (if log_warning>2).

      The client just receives an unspecific "Lost connection to MySQL server during query" error without actual information why the query and the connection was terminated.

      Even worse: sending the query to the server does not even reset the idle timer. With wait_timeout=60 and a client that has already idle for 30 seconds, query and connection are terminated after another 30 seconds already.

      IMHO this is wrong as the client is not actually idle, the responsibility for the inactivity is totally on the server side, and even if we consider to terminate a query after a certain wait time in the pool-of-threads queue, there should be a more meaningful error message for this, and a separately configurable timeout for this.

      Attachments

        Issue Links

          Activity

            People

              wlad Vladislav Vaintroub
              hholzgra Hartmut Holzgraefe
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.