[mythtv] Too many connections to database

DanM dan at milkcarton.com
Thu Apr 8 20:05:46 EDT 2004


> 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)




More information about the mythtv-dev mailing list