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

Wrong error message (Unknown error) when idle sessions are killed after wait_timeout

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 10.1, 10.0, 5.5
    • Fix Version/s: 10.1, 10.0
    • Component/s: OTHER
    • Labels:

      Description

      Hi,

      my server has wait_timeout set to 28800 seconds (8 hours).

      Looking at my sessions idling ...

      MariaDB [(none)]> select * FROM INFORMATION_SCHEMA.PROCESSLIST ORDER BY TIME DESC LIMIT 10;
      +-------+-------------+----------------------+--------------+---------+-------+--------------------+------+--------------+-------+-----------+----------+-------------+---------------+----------+
      | ID    | USER        | HOST                 | DB           | COMMAND | TIME  | STATE              | INFO | TIME_MS      | STAGE | MAX_STAGE | PROGRESS | MEMORY_USED | EXAMINED_ROWS | QUERY_ID |
      +-------+-------------+----------------------+--------------+---------+-------+--------------------+------+--------------+-------+-----------+----------+-------------+---------------+----------+
      |     2 | system user |                      | NULL         | Sleep   | 43731 | NULL               | NULL | 43731770.086 |     0 |         0 |    0.000 |       35296 |             0 |        0 |
      |     1 | system user |                      | NULL         | Sleep   | 43731 | wsrep aborter idle | NULL | 43731770.096 |     0 |         0 |    0.000 |       35296 |             0 |        0 |
      (...)
      | 73945 | webapp-xx   | 205.xxx.xx.xxx:12345 | database_name | Sleep   | 28590 |                    | NULL | 28590778.291 |     0 |         0 |    0.000 |       50640 |             0 |  8197323 |
      
      (...)
      

      Then in the log, I can see:

      150313 11:18:20 [Warning] Aborted connection 73645 to db: 'database_name user: 'webapp-xx' host: '205.xxx.xx.xxx' (Unknown error)
      

      I think the error message should be more explicit, such as "connection closed due to wait_timeout limit reached".

      To reproduce, start mariadb server, with --log_warnings=2, set wait_timeout, and let application session idle until the timeout, then look at error log.

      Thanks,
      Joffrey

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            elenst Elena Stepanova added a comment -

            It is actually a regression. We used to have a proper message in 5.1-5.3, but lost it in 5.5 and higher. MySQL 5.5 produces the correct message.

            5.3
            [Warning] Aborted connection 2 to db: 'test' user: 'root' host: 'localhost' (Got timeout reading communication packets)
            
            5.5
            [Warning] Aborted connection 2 to db: 'test' user: 'root' host: 'localhost' (Unknown error)
            
            Show
            elenst Elena Stepanova added a comment - It is actually a regression. We used to have a proper message in 5.1-5.3, but lost it in 5.5 and higher. MySQL 5.5 produces the correct message. 5.3 [Warning] Aborted connection 2 to db: 'test' user: 'root' host: 'localhost' (Got timeout reading communication packets) 5.5 [Warning] Aborted connection 2 to db: 'test' user: 'root' host: 'localhost' (Unknown error)

              People

              • Assignee:
                serg Sergei Golubchik
                Reporter:
                joffrey Joffrey MICHAIE
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: