[mythtv] Too many connections to database
Ben Brown
mythtv at handcoder.com
Wed Apr 21 00:23:59 EDT 2004
DanM wrote:
>>Nope, mythtv creates multiple connections to the database from the different
>>threads (to avoid having to deal with thread syncronisation), whether some of
>>those is not closed down properly is another issue. Have you checked `netstat
>>-tuap` when this occurs?
>>
>>
>>
>I think the issue may be the connection is not getting closed down
>properly. I've done show processlist a few times in the past and some of the
>connections have an idle time of thousands of seconds. This one happens
>to show 14 connections with idle times > 1000. I've planned on looking
>into this in the past, but it all takes time.
>
>-dan
>
>mysql> show processlist;
>+----+--------+---------------+-------------+---------+------+-------+------------------+
>| Id | User | Host | db | Command | Time | State |
>Info |
>+----+--------+---------------+-------------+---------+------+-------+------------------+
>| 20 | mythtv | 192.168.77.98 | mythconverg | Sleep | 2892 | | NULL |
>| 22 | mythtv | 192.168.77.98 | mythconverg | Sleep | 2853 | | NULL |
>| 23 | mythtv | 192.168.77.98 | mythconverg | Sleep | 2892 | | NULL |
>| 24 | mythtv | 192.168.77.98 | mythconverg | Sleep | 2892 | | NULL |
>| 25 | mythtv | 192.168.77.98 | mythconverg | Sleep | 2901 | | NULL |
>| 26 | mythtv | 192.168.77.98 | mythconverg | Sleep | 4279 | | NULL |
>| 27 | mythtv | 192.168.77.98 | mythconverg | Sleep | 2962 | | NULL |
>| 28 | mythtv | 192.168.77.98 | mythconverg | Sleep | 4185 | | NULL |
>| 29 | mythtv | 192.168.77.98 | mythconverg | Sleep | 2962 | | NULL |
>| 32 | mythtv | 192.168.77.98 | mythconverg | Sleep | 6781 | | NULL |
>| 33 | mythtv | 192.168.77.98 | mythconverg | Sleep | 4506 | | NULL |
>| 34 | mythtv | 192.168.77.98 | mythconverg | Sleep | 4279 | | NULL |
>| 35 | mythtv | 192.168.77.98 | mythconverg | Sleep | 9 | | NULL |
>| 36 | mythtv | 192.168.77.98 | mythconverg | Sleep | 0 | | NULL |
>| 37 | mythtv | 192.168.77.98 | mythconverg | Sleep | 14 | | NULL |
>| 38 | mythtv | 192.168.77.98 | mythconverg | Sleep | 10 | | NULL |
>| 39 | mythtv | 192.168.77.98 | mythconverg | Sleep | 1 | | NULL |
>| 40 | mythtv | 192.168.77.98 | mythconverg | Sleep | 255 | | NULL |
>| 41 | mythtv | 192.168.77.98 | mythconverg | Sleep | 255 | | NULL |
>| 42 | mythtv | 192.168.77.98 | mythconverg | Sleep | 24 | | NULL |
>| 43 | mythtv | 192.168.77.98 | mythconverg | Sleep | 1075 | | NULL |
>| 44 | mythtv | 192.168.77.98 | mythconverg | Sleep | 9 | | NULL |
>| 45 | mythtv | 192.168.77.98 | mythconverg | Sleep | 2646 | | NULL |
>| 46 | mythtv | 192.168.77.98 | mythconverg | Sleep | 6 | | NULL |
>| 47 | root | localhost | NULL | Query | 0 | NULL | show processlist |
>+----+--------+---------------+-------------+---------+------+-------+------------------+
>25 rows in set (0.00 sec)
>
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>mythtv-dev mailing list
>mythtv-dev at mythtv.org
>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>
>
I've been getting this erro on and off for about 3 weeks now. All with
various version of CVS. Currently I'm using CVS as about 1 week ago.
Someone suggest increasing my max_connections in my sql, which I did,
but I'm still getting to many connections. I've got mysql to accept 300
connections, and myth fills up those 300 connections in about 10
minutes. I've worked around it by setting connections to expire in 60
seconds, but that's just a work around. Something is deffinatly not
cleaning itself up. Let me know if there are any specifics I can help
you with. I've been running Mythtv on this box for over a year now, and
this just recently started happening.
Thanks
Benb
More information about the mythtv-dev
mailing list