I have a my.cnf file. In it I see wait_timeout as well as connect_timeout. What's the difference between these 2?
Asked
Active
Viewed 5.4k times
2 Answers
21
Right from the MySQL Documentation
- wait_timeout : The number of seconds the server waits for activity on a noninteractive connection before closing it.
- connect_timeout : The number of seconds that the mysqld server waits for a connect packet before responding with Bad handshake
EXAMPLES
- If wait_timeout is 1800 (30 Minutes), the DB Connection will close in 30 minutes if the connection is idle (indicated by
Sleepin the command column of the processlist). - If connect_timeout is 10, then mysqld will reject you if you cannot login (authenticate) in 10 seconds.
RolandoMySQLDBA
- 185,223
- 33
- 326
- 536
1
wait_timeout is how long to keep a connection as idle state. connect_timeout is how long to wait for a connection to be made.
This is my best understanding, please comment or edit as needed.
Adam Mulla
- 143
- 2
- 12
Goose
- 319
- 2
- 4
- 12