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

With a small MaxDirectMemorySize size and a flood of POST requests an off heap OOME can occur

XMLWordPrintable

      When a POST request is made with an entity, the entity content may be written to a temporary file. This is done via Files.newOutputStream(tempFile). If you post larger entities and have a small -XX:DirectByteBuffer size set, the underlying DirectByteBuffer can run out of off heap memory resulting in aborted requests. With requests up to 30-50 mbs and it seems RESTEasy is writing that in full at once to the underlying stream and thus allocating such a large buffer to match through the resulting sun.nio.ch.Util.getTemporaryDirectBuffer call.

              jperkins-rhn James Perkins
              jperkins-rhn James Perkins
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: