On 07/06/2012 11:47 AM, Knut Forkalsrud wrote:
You may want to keep track of the DB pool statistics. Active versus maximum allocation counts. If this is a connection leak you would notice the number of active connection creeping upwards until it reaches max and your freezing symptoms appear.


Also, which driver is this with? There's a specific synchronization problem with the mysql ConnectionPool driver that might be a problem.

And, for jstack, the thread that owns the lock/counter is more important than the threads waiting. If you can find the threads that are opening the connection (in the actual driver code), that would help track this down.

An upgrade might help, but it would depend on what's causing the problem.

-- Scott


Knut Forkalsrud



On Fri, Jul 6, 2012 at 5:51 AM, Steven Cassidy <steven.cass...@gmail.com <mailto:steven.cass...@gmail.com>> wrote:

    Hi, I'm using resin-3.1.3 on a busy site. Periodically the site
    freezes. A jstack on the server shows most threads in this state:

    java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at com.caucho.jca.ConnectionPool.create(ConnectionPool.java:897)
    - locked <0x00002aaaba60be48> (a java.util.ArrayList)
    at com.caucho.jca.ConnectionPool.allocatePool(ConnectionPool.java:779)
    at com.caucho.jca.ConnectionPool.allocate(ConnectionPool.java:740)
    at
    com.caucho.jca.ConnectionPool.allocateConnection(ConnectionPool.java:551)
    at com.caucho.sql.DataSourceImpl.getConnection(DataSourceImpl.java:65)
    at com.caucho.sql.DBPool.getConnection(DBPool.java:669)

    It looks like no thread ever gets notified and all wait indefinitely.
    Resin generally restarts itself about 15 minutes later if left alone.
    The database itself apppears idle during this time.

    I wondered if this might be a known problem and if upgrading to 3.1.12
    would help? I don't think the pool is full. I noticed a pool timing
    issue was fixed in 3.1.10 (bug 3837) and the implementation of the
    allocate method changed, but that wasn't directly related to freezing.
    Perhaps we should just try it and see, but I figured I'd ask if this
    was noted / known behavior.

    Many thanks,
    Steven

    _______________________________________________
    resin-interest mailing list
    resin-interest@caucho.com <mailto:resin-interest@caucho.com>
    http://maillist.caucho.com/mailman/listinfo/resin-interest




_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to