MySQL connections don't reconnect after idle timeout
Tthis is a workaround I use and it works for me.
for explanations of the options below.
in /etc/my.cnf you can add this…
# vim /etc/my.cnf
# 3 day timeout in seconds
[mysqld]
wait_timeout=259200
interactive_timeout=259200
The default value for wait_timeout is 28800 which is 8 hours.
wait_timeout is for connections from TCP/IP.
I also found this.
Note:The suggested fix would be to trap error 2006 and immediately attempt to reconnect to the database.
Thank you for such a wonderful Information !!
ReplyDeleteHere is a list of Top LINUX INTERVIEW QUESTIONS
Linux FTP vsftpd Interview Questions
SSH Interview Questions
Apache Interview Questions
Nagios Interview questions
IPTABLES Interview Questions
Ldap Server Interview Questions
LVM Interview questions
Sendmail Server Interview Questions
YUM Interview Questions
NFS Interview Questions
Read More at :- Linux Troubleshooting