When there are big objects around 30MB customer face a problem in using SSLFilter,
Customer analyzed the issue and concluded the problem is related to the buffer enlargement in IOBlockFilterContainer:
Stack Trace Objects Total Size(bytes) Pressure(%)
java.nio.HeapByteBuffer.<init>(int, int) 32.074 140.523.490.480 99,067
java.nio.ByteBuffer.allocate(int) 32.074 140.523.490.480 99,067
com.gigaspaces.lrmi.nio.filters.IOBlockFilterContainer.enlargeBuffer(ByteBuffer, int) 1.492 140.050.563.008 98,734
com.gigaspaces.lrmi.nio.filters.IOBlockFilterContainer.unwrap(IOFilterContext) 1.492 140.050.563.008 98,734
The ByteBuffers are allocated with the initial size of 16916Bytes. This value is configured in sun.security.ssl.SSLSessionImpl.
This size is not enough in some cases to store a full message so the buffer needs to be enlarged (method com.gigaspaces.lrmi.nio.filters.IOBlockFilterContainer.unwrap(IOFilterContext)). But the buffer is enlarged by max 16916 bytes at a time causing the issue, Customer suggests either enlarging by doubling the size each time or
store the unwrapped size and allocate accordingly.