0

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?

enter image description here

Roy Hinkley
  • 527
  • 4
  • 13
  • 20

1 Answers1

0

It turns out RedHat has it's own MySQL folders. My config file in the default /etc/my.cnf was not being consumed.

Roy Hinkley
  • 527
  • 4
  • 13
  • 20