gotchasqlMajor
MySQL difference between wait_timeout and connect_timeout
Viewed 0 times
differencemysqlbetweenandwait_timeoutconnect_timeout
Problem
I have a
my.cnf file. In it I see wait_timeout as well as connect_timeout. What's the difference between these 2?Solution
Right from the MySQL Documentation
EXAMPLES
- 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.
Context
StackExchange Database Administrators Q#162453, answer score: 21
Revisions (0)
No revisions yet.