Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1112

Potential memory leak with DeflatingStreamSinkConduit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.4.17.Final, 1.3.31.Final
    • 1.4.11.Final
    • Core
    • None

      We've noticed unusual memory consumption pattern with one of our services based on Undertow. After a lengthy investigation with native memory profiling, the issue boiled down to the fact that we use gzip compression for output and GzipEncodingProvider respectively. Deflater releases memory either when end() function is called explicitly or when it's garbage-collected which is not particularly reliable. Our fix is to wrap existing gzip conduit into FinishableStreamSinkConduit and use deflater.end() as finish operation. I assume it would be a proper way for DeflatingStreamSinkConduit to handle this out of the box.

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              edudar Eduard Dudar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: