Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-1668

Memory Exhaustion Problem with Deserialization of ObjectContext

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.2
    • 3.1B1
    • Core Library
    • None
    • MacOS-X 10.7, Java 1.6.0_29, Simple Web Application run in the Maven plugin "jetty-maven-plugin"

    Description

      I am running a simple web application launched from maven using "jetty-maven-plugin". The simple web application has a Filter which does this;

      1) Copies the HttpSession's attributes to a Map
      2) Serializes the Map
      3) Deserializes the Map
      4) Copies the entries of the Map back into HttpSession

      In each case, the ClassLoader should be the same (no stranded singletons etc...) and there is no "hot deploy" happening. The purpose of this undertaking is to ensure that the application is able to handle serialized sessions. In doing this experiment, I have observed a memory exhaustion issue around serializing and de-serializing ObjectContext. If I explicitly stop serializing "ObjectContext" then the problem stops.

      Using jprofiler, I have observed that the memory consumption increases roughly exponentially in relation to the number of serialization/de-serialization events. Also from jquery analysis I see the memory is being referenced from;

      org.apache.commons.collections.map.AbstractHashedMap$HashEntry[]
      > org.apache.commons.collecitons.map.LRUMap
      >> org.apache.cayenne.access.jdbc.SQLTemplateResourceManager
      >>> ...velocity

      The problem manifests itself quite quickly; a few dozen serialize + de-serialize phases.

      Attachments

        Activity

          People

            Unassigned Unassigned
            apl Andrew Ponsonby Lindesay
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: