Due to bad handing of mysql connections (Not properly closed the connections ) there will be several already used open mysql connections waiting to close. By default the connection waiting timeout and the interactive time out values are 8 hours (28800 seconds).
Times set in your mysql server can be observed using following commands;
If you want to set these values according to your requirement edit your my.cnf (Default location is /etc/my.cnf) and add following setting under mysqld.
[mysqld]
interactive_timeout=3360
wait_timeout=3360
As given above I have set the value to 3360 ( which is 1 hour)
Then restart the service and it will effect the new connections.
Good reference:
http://stackoverflow.com/questions/4284194/terminating-idle-mysql-connections
http://dba.stackexchange.com/questions/1558/how-long-is-too-long-for-mysql-connections-to-sleep
Times set in your mysql server can be observed using following commands;
mysql> show variables like "%timeout%";
It will list down several timeout settings including interactive_timeout and wait_timeoutIf you want to set these values according to your requirement edit your my.cnf (Default location is /etc/my.cnf) and add following setting under mysqld.
[mysqld]
interactive_timeout=3360
wait_timeout=3360
As given above I have set the value to 3360 ( which is 1 hour)
Then restart the service and it will effect the new connections.
Good reference:
http://stackoverflow.com/questions/4284194/terminating-idle-mysql-connections
http://dba.stackexchange.com/questions/1558/how-long-is-too-long-for-mysql-connections-to-sleep