mysqld will timeout DB Connections based on two(2) server options:
- interactive_timeout
- wait_timetout
Both are 28800 seconds (8 hours) by default.
You can set these options in /etc/my.cnf
[mysqld]
interactive_timeout=180
wait_timeout=180
If you do not want to restart mysql, then run these two commands:
SET GLOBAL interactive_timeout = 180;
SET GLOBAL wait_timeout = 180;