Difference between revisions of "Troubleshooting:MySQL server has gone away"

From MythTV Official Wiki
Jump to: navigation, search
 
m (Change category)
Line 19: Line 19:
 
(I think only one of the two values is needed, but I can't remember which and no longer
 
(I think only one of the two values is needed, but I can't remember which and no longer
 
use a pre 0.19-fixes MythTV).
 
use a pre 0.19-fixes MythTV).
 +
 +
[[Category:Error messages]]

Revision as of 16:38, 8 November 2006

Version 5 of MySQL and probably subsequent versions more aggresively time out inactive connections than previously.

If a MythTV backend does not perform any transactions over it's DB connection it may be timed out by MySQL and closed.

In versions of MythTV up to 0.19 release this would require a restart of mythbackend. Versions of MythTV starting with 0.19-fixes will now automatically attempt to reconnect to the MySQL database.

Alternatively instead of upgrading your MythTV version you can try editing your my.cnf (usually in /etc/mysql/). Adding the two lines

connect_timeout = 2592000 wait_timeout = 2592000

will tell the MySQL DB to wait much longer before timing out inactive connections.

(I think only one of the two values is needed, but I can't remember which and no longer use a pre 0.19-fixes MythTV).