I have a simple web application written in java which has servlets accessing the Mysql Database to generate reports. The report generation happens very frequently.
I am using the apache commons DBCP to get connections to the DB. I also close the connection explicity in the finally block always. But i do not explicitly close the Statements and ResultSets i create.
I'm forced to restart the tomcat instance everytime i get the Exception which says "java.sql.SQLException: Too many connections".
How do i overcome this.... do i need to increase the maxconnections in Mysql ?.
Any help is appreciated.