0 Replies Latest reply: Mar 10, 2010 4:38 PM by 807574 RSS

    JDBC to MySQL running out of connections

      We have a simple project which inserts data into a MySQL table. When running it seems to make 2 connections, one of which exits after 30 seconds, the other sticks around in "Sleep" mode for around 12 hours. At that time it is terminated, I believe, by MySQL but still counts as a connection in the JCAPS connection pool. There are three other projects with the same issue. They all run once a day, and after 10 days the appserver log indicates we have run out of connections. MySQL admin at the time shows no connections (other than itself).

      The server log shows:

      Caused by: java.sql.SQLException: JDBCADPTR-0042:
           Failed opening a database session:
           java.sql.SQLException: Error in allocating a connection.
           Cause: In-use connections equal max-pool-size and expired max-wait-time. Cannot allocate more connections.

           (MinPoolSize set in Env properties for JDBC adapters = 0, Max pool size = 10, MaxIdleTime = 30secs)

      Undeploying the project(s) releases (resets?) the connections.

      Has anyone else seen this behavior? Is there a way, perhaps in the JCD to close the connection?