Large number of EventManager threads causing OutOfMemoryException

From: Victor Leung (victor.leun..igiflex-solutions.com)
Date: Thu Apr 29 2010 - 13:07:15 EDT

  • Next message: MGargan..scholar.com: "Spring + Cayenne"

    Hi all,

    We are using Cayenne 3.0RC3. Our application has a web tier and a business /
    data access tier (both deployed on Glassfish v2.1.1). Communication between
    the two tiers is through the use of Cayenne Web Service.

    We have been encountering OutOfMemoryException after a couple of days of
    routine usage. Heap dumps show a large number of daemon threads associated
    with EventManager. As an example, there are some 13,000 entries in the heap
    dump similar to this:

        "cayenne-edt-16165743-0" daemon prio=10 tid=0x576d3800
    nid=0x5b2a in Object.wait() [0x847ad000]
           java.lang.Thread.State: TIMED_WAITING (on object monitor)
            at java.lang.Object.wait(Native Method)
            at
    org.apache.cayenne.event.EventManager$DispatchThread.run(EventManager.java:476)
            - locked <0x96d28c40> (a
    java.util.Collections$SynchronizedList)

    There are no evidence of any deadlocked threads.

    We have since turned on monitoring on the JVM. It appears that the number of
    daemon threads stays more-or-less constant whilst we are just reading from
    the DB, but will creep up slowly over time whenever we do any sort of DB
    updates.

    Any hints as to how we can get around this problem would be much
    appreciated!

    Thanks in advance,
    Vic



    This archive was generated by hypermail 2.0.0 : Thu Apr 29 2010 - 13:08:22 EDT