[mythtv-commits] Ticket #5482: PATCH: Purge unused database-connections after 3600 secs [SVN: Trunk]

MythTV mythtv at cvs.mythtv.org
Fri Jun 27 21:21:14 UTC 2008

#5482: PATCH: Purge unused database-connections after 3600 secs [SVN: Trunk]
 Reporter:  tomimo at ncircle.nullnet.fi  |       Owner:  ijr    
     Type:  patch                      |      Status:  new    
 Priority:  minor                      |   Milestone:  unknown
Component:  mythtv                     |     Version:  head   
 Severity:  medium                     |     Mlocked:  0      
 Mysql has this variable max_connect_errors which is used to protect the db
 from possible attackers. If connect errors increase over time to the
 max_connect_errors the Mysql db will block the host from connecting for

 The attached patch purges unsused db-connections after they have been idle
 more than 1 hour in the hope that mysql will not count those connections
 into max_connect_errors counter if they would be allowed be terminated by
 MySQL instead.

 Mythtv will create additional threads in case there are more incoming
 processing requests than available threads. The created threads will go
 into pool later on. However, there might be days and days until the next
 busy period where the same amount of db-connections are really required.

 The attached patch also rotates the db-connections in the pool instead of
 always preferring on using the same threads.

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

More information about the mythtv-commits mailing list