Just to explain what is happening,

The connection is lost after wait_timeout seconds of inactivity (SHOW VARIABLES in MySQL). That is why your database connections are closed after this period. You can alter this period in the my.cnf file.


In reply to Re: mysql_auto_reconnect by Marcello
in thread mysql_auto_reconnect by Anonymous Monk

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":