Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-556

PermGen Leak when using Atom providers

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.2.1
    • 2.2.0.GA
    • jaxrs
    • Hide

      Using the unit test attached, you should be able to reproduce. Basically, call writeTo method of AtomFeedProvider/AtomEntryProvider multiple times, watch number of classes loaded in JVM continue to rise.

      Show
      Using the unit test attached, you should be able to reproduce. Basically, call writeTo method of AtomFeedProvider/AtomEntryProvider multiple times, watch number of classes loaded in JVM continue to rise.

    Description

      While performing load tests on a new system using RestEASY to provide atom feed representations, I discovered that the PermGen space was continually rising; I tracked this issue down to the AtomEntryProvider and AtomFeedProvider classes. From other things I've seen on the internet, it appears that the JAXB implementors intend for JAXBContext objects to be reused (e.g. see http://java.net/jira/browse/JAXB-581).

      I'm attaching a patch with both a unit test and a fix for the two classes, switching them from using createContext to findCacheContext. Given the above issue, it may also be worthwhile to consider redesigning the JAXBContextFinder interface so that createContext is not exposed.

      Attachments

        Activity

          People

            patriot1burke@gmail.com Bill Burke (Inactive)
            lawrie00 James Lawrie (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: