Updated on 2024-12-23 GMT+08:00

Parameter Description

mysql> show variables like '%idle%';
+------------------------------------+------+
| Variable_name                     | Value |
+-----------------------------------+-------+
| idle_readonly_transaction_timeout | 0     |
| idle_transaction_timeout         | 0     |
| idle_write_transaction_timeout   | 0     |
+-----------------------------------+-------+
​
Table 1 Parameter description

Parameter

Level

Description

idle_readonly_transaction_timeout

global, session

Time in seconds that the server waits for idle read-only transactions before killing the connection.

If this parameter is set to 0, there is not timeout threshold for idle read-only transactions.

idle_transaction_timeout

global, session

Time in seconds that the server waits for common idle transactions before killing the connection.

If this parameter is set to 0, there is not timeout threshold for common idle transactions.

idle_write_transaction_timeout

global, session

Time in seconds that the server waits for idle read/write transactions before killing the connection.

If this parameter is set to 0, there is not timeout threshold for idle read/write transactions.

The parameters idle_readonly_transaction_timeout and idle_write_transaction_timeout have higher priorities than the parameter idle_transaction_timeout.

Figure 1 Read-only transactions
Figure 2 Read/Write transactions