Our application developed using java and mysql Db as a backend. for conenction pooling we have used tomcat-jdbc connection pooling where configured the maxActive connection size to 300. from last few days our application frequently reaching the maxdb connection size and at that time when we check the mysql processlist it shows that all the connections are in sleep state. almost for every connection sleep time is below 50 seconds and after that sleep time reset for same connection id.
we have also used proxy sql.