If a connection last longer than 'interactive_timeout' limit value, will that connection get dropped automatically. which are all connections will it drop. I mean only Sleep connections or even active connections as well? Then what about wait_timeout variable ... ?? please explain.
Asked
Active
Viewed 7,245 times
1 Answers
1
interactive_timeout - The number of seconds the server waits for activity on an interactive connection before closing it.
wait_timeout - The number of seconds the server waits for activity on a noninteractive connection before closing it. This timeout applies only to TCP/IP and Unix socket file connections, not to connections made using named pipes, or shared memory. On thread startup, the session wait_timeout value is initialized from the global wait_timeout value or from the global interactive_timeout value, depending on the type of client (as defined by the CLIENT_INTERACTIVE connect option to mysql_real_connect()).
Sleep connections and waiting connections are dropped.
For differences refer here.

Community
- 1
- 1

Sunil Goli
- 449
- 4
- 11
-
3Both wait_timeout and interactive_timeout is the time of inactivity before the connection is dropped. So, the connection must be idle (not running a query) before it will be dropped. MySQL SLEEP() does not count, since you're running a query. Kindly check this [Link](http://stackoverflow.com/questions/10027453/mysql-wait-timeout-not-being-honored-for-long-query?rq=1). – NarasimhaTejaJ Nov 13 '14 at 12:43