[mythtv-users] What might make the backend loose the database connection to localhost?

Dan Wilga mythtv-users2 at dwilga-linux1.amherst.edu
Tue Oct 26 14:11:49 UTC 2010


On 10/26/10 8:04 AM, Tom Dexter wrote:
> Last night I had an odd thing happen.  In the middle of recording
> apparently the backend lost it's connection to the database (running
> on the same server connected as localhost), and all the sql started
> generating errors like this:
>
> 2010-10-25 21:00:03.357 DB Error (Resolution insert):
> Query was:
> INSERT INTO recordedmarkup    (chanid, starttime, mark, type, data)
> VALUES ( :CHANID, :STARTTIME,
>   :MARK, :TYPE, :DATA);
> Bindings were:
> :CHANID=1041, :DATA=1920, :MARK=1, :STARTTIME=2010-10-25T21:00:00, :TYPE=30
> Driver error was [2/2006]:
> QMYSQL: Unable to execute query
> Database error was:
> MySQL server has gone away
>    
That last line is what you should google. It sounds as though MySQL hit 
its connection timeout and dropped the connection at a point when Myth 
wasn't expecting that to happen.

The solution is most likely to look at wait_timeout and 
interactive_timeout MyQSL variables. These are in seconds. If there are 
values set in /etc/my.cnf, increase them. The defaults are very large (8 
hours), so if nothing is set, that's not the problem. You can do this to 
see the current values:

mysql -u mythtv --password=mythtv
show variables like '%timeout';
\q

-- 
Dan Wilga                                                        "Ook."



More information about the mythtv-users mailing list