[mythtv-commits] Ticket #946: MySQL server gone away bug with MySQL 4.1 and 5.0

MythTV mythtv at cvs.mythtv.org
Thu Jan 5 23:50:54 UTC 2006


#946: MySQL server gone away bug with MySQL 4.1 and 5.0
----------------------------------+-----------------------------------------
 Reporter:  d.r.newman at qub.ac.uk  |       Owner:  ijr   
     Type:  defect                |      Status:  new   
 Priority:  major                 |   Milestone:        
Component:  mythtv                |     Version:  0.18.1
 Severity:  medium                |  
----------------------------------+-----------------------------------------
 Ever since I changed to MySQL 4.1 and then MySQL 5.0, mythtv has been
 falling over 2 or 3 times a week. Mythbackend looses its connection to
 MySQL, and keeps attempting to kick the database into life. I get lots of
 errors like the extract I have pasted below. I have not detected a
 consistent pattern causing the loss of MySQL connection, although I have
 noticed it happens if mythtv does not do any recording for a day, and when
 I am quickly browsing through the menus.

 In the source code, there are several references to code written to get
 around bugs in the way MySQL3 behaves. Perhaps the MySQL oddities have
 been fixed in the more recent version, so the work-arounds no longer work.

 I don't understand the code well enough to fix it myself, but I am happy
 to test code sent to me by others.

 One possible fix would be to give up persistent connections for good, and
 just open a new connection every time mythbackend wants to connect to the
 database. After all, mythbackend doesn't hit the database all that much,
 compared to your typical CMS on a web server.
 {{{
  --<part of mythbackend.log>--
  2006-01-05 08:23:31.245 Started recording "Will and Grace" on channel: 4
 on cardid: 1, sourceid 1
  DB Error (KickDatabase):
  Query was:
  SELECT NULL;
  Driver error was [2/2006]:
  QMYSQL3: Unable to execute query
  Database error was:
  MySQL server has gone away

  2006-01-05 08:23:31.249 scheduler: Schedule Change
  DB Error (KickDatabase):
  Query was:
  SELECT NULL;
  Driver error was [2/2006]:
  QMYSQL3: Unable to execute query
  Database error was:
  MySQL server has gone away

  DB Error (KickDatabase):
  Query was:
  SELECT NULL;
  Driver error was [2/2006]:
  QMYSQL3: Unable to execute query
  Database error was:
  MySQL server has gone away
 }}}

-- 
Ticket URL: <http://cvs.mythtv.org/trac/ticket/946>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list