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

MediaType memory leak

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.3.1
    • 2.0.1.GA
    • jaxrs
    • None

      We are using multipart content type as shown below.

      Content-Type: "multipart/form-data; boundary=pOnbFW_YNccp2iCWIsec4ZXHD4v2mbj50xn-Xpw"

      After few hours of load testing we notice that OldGen space is all used up and Full GC start to kick in. Heap dump analysis shows that in 2G Heap, 1G was occupied by javax.ws.rs.core.MediaType objects. There were 1.7 million of them. RestEasy seems to use this objects to cache HTTP content-type, and they won't ever get released. Normally content-type is fixed String. However, in multipart type, boundary value changes and this might cause new MediaType creation on every call.

              patriot1burke@gmail.com Bill Burke (Inactive)
              melchung_jira Mel Chung (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: