I get a "too many connections" error from time to time with my mysql database, if I do a
show status like 'Conn%';
I get a result like this
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| Connections | 291 |
+---------------+-------+
1 row in set (0.00 sec)
but if I look at the processlist with
SHOW FULL PROCESSLIST;
I only see a few real connections
+-----+---------+------------------------------+---------+---------+------+-------+-----------------------+
| Id | User | Host | db | Command | Time | State | Info |
+-----+---------+------------------------------+---------+---------+------+-------+-----------------------+
| 28 | www | webhost01:38876 | webapp | Sleep | 2 | | NULL |
| 29 | www | webhost01:53322 | webapp | Sleep | 2 | | NULL |
| 30 | www | webhost01:45583 | webapp | Sleep | 2 | | NULL |
| 31 | www | webhost01:35779 | webapp | Sleep | 2 | | NULL |
| 32 | www | webhost01:49122 | webapp | Sleep | 2 | | NULL |
| 36 | root | localhost | NULL | Query | 0 | NULL | SHOW FULL PROCESSLIST |
| 126 | stats | localhost | stats | Sleep | 1056 | | NULL |
+-----+---------+------------------------------+---------+---------+------+-------+-----------------------+
How can I see all connections? I suspect that some applications don't close their connections, how can I debug/prevent this?