[mythtv-commits] Ticket #7836: Idle frontend "wakeup" delay

MythTV mythtv at cvs.mythtv.org
Fri Jan 1 15:21:59 UTC 2010


#7836: Idle frontend "wakeup" delay
--------------------------------+-------------------------------------------
 Reporter:  stichnot@…          |       Owner:  ijr    
     Type:  patch               |      Status:  new    
 Priority:  minor               |   Milestone:  unknown
Component:  MythTV - General    |     Version:  unknown
 Severity:  medium              |     Mlocked:  0      
--------------------------------+-------------------------------------------
 Several users have noticed that sometimes when the frontend has been idle
 for a while, there is an extra 5-second delay in loading pages like Watch
 Recordings.  This seems to be due to something in Qt's mysql driver, which
 apparently keeps track of the number of open DB connections, and when it
 hits 0, calls my_thread_global_end().  The mysql library then assumes the
 application is ending and that all threads that created DB connections
 have already exited.  This is rarely true, and may result in the mysql
 library pausing 5 seconds and printing a message like "Error in
 my_thread_global_end(): 1 threads didn't exit".

 The PurgeIdleConnections() routine deletes all pooled DB connections that
 have been idle for more than an hour, and may trigger this 5-second delay.
 I have seen this when selecting Watch Recordings and MythVideo, and also
 sometimes when exiting playback.

 This patch simply creates an extra DB connection before all pooled
 connections are purged so that my_thread_global_end() won't be called.

 To try to reproduce the delays, and for helping to verify this fix, I
 recommend changing the idle timeout in PurgeIdleConnections() from 3600
 seconds to 15 seconds, to trigger the purge far more frequently.

-- 
Ticket URL: <http://svn.mythtv.org/trac/ticket/7836>
MythTV <http://www.mythtv.org/>
MythTV


More information about the mythtv-commits mailing list