I guess I have some application problems which are slowing down our whole app and will cause maybe damage and other problems.  

The applications problems occur by many mysql connections which are sleeping. 

The `SHOW PROCESSLIST;` output: 

```
| 356058234 | Y  | X:39119 | D | Sleep   |  1442 |       | NULL             |
| 356058441 | Y  | X:39126 | D | Sleep   |  1442 |       | NULL             |
| 356059383 | Y  | X:46615 | D | Sleep   |  2049 |       | NULL             |
| 356059389 | Y  | X:46617 | D | Sleep   |  2052 |       | NULL             |
| 356065991 | Y  | X:39267 | D | Sleep   |  1442 |       | NULL             |
-------------  
452 rows in set (0.00 sec)

```

Also `mysqlreport` 

```
__ Connections _________________________________________________________
Max used         8001 of 8000      %Max: 100.01
Total         356.07M    58.6/s

```

Which shows I am really running out of connections. Even by a limit of 8000. Here has to be something. But debugging such things can be troublesome. 

Anyways I looked that Process IDs up with netstat for example like this `netstat -ntp | grep :39267` which outputs:

```
tcp        0      0 IP_1:3306      IP_2:38727    VERBUNDEN   791/mysqld

```

So I go one step further and look up `791` which outprints me a long string (several hundred lines) which look like those ones here:

```
tcp        0      0 IP_1:3306      IP_2:34109    VERBUNDEN   791/mysqld      
tcp        0      0 IP_1:3306      IP_3:32864    VERBUNDEN   791/mysqld      
tcp        0      0 IP_1:3306      IP_3:37231    VERBUNDEN   791/mysqld      
tcp        0      0 IP_1:3306      IP_2:38727    VERBUNDEN   791/mysqld      
tcp        0      0 IP_1:3306      IP_2:36645    VERBUNDEN   791/mysqld

```

But what does this tell me? Which more informations should I collect to have a clue which actually causes that too many connections problem?

Further informations about the application:  

We run code - which updates, inserts and deletes quite big on our Database - on several servers, which get those data by the forking Framework **Gearman**. We are running a **MySQL INNODB Database** which get used by our **PHP 5.4** and **Zend Framework** driven application. OS is **Linux(Debian)**.