I have a web application running on Tomcat7 that connects to MySQL 5.5.
I have two servers running the identical code:
Ubuntu
Red Hat
The Ubuntu one runs fine maintaining a steady 8-16 connections, but the Red Hat one leaks connections and the connection count grows, never going down. The server eventually resets ~152 connections and the cycle repeats.
The code to close the connection is getting called:
try {
conn.close();
} catch (SQLException e) {
exceptionController.logException(this.getClass().getSimpleName(), "finalize Db", e.getMessage(), false);
}finally{
conn = null;
}
Why the difference in behavior? Are there configuration settings that I should be condsidering?