Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Question regarding Websocket and MappedByteBufferPool behavior

Hi,

On Tue, Jul 30, 2019 at 1:05 PM Ofir Prizat <ofir.prizat@xxxxxxxxx> wrote:
>
> Hi Simone,
>
> Thanks for the reply.
>
> It is totally understandable that the pool components are long lived. What we do not understand is how come the ByteBufferPool size only keeps on increasing over time, even though Websocket connections come and go.
>
> What could be the trigger for the allocation of more and more buffers over time? Is there any scenario/timing they should be cleared / garbage collected?
>
> Our app handles hundreds of websocket connection which come and go every day, and looking at the heapdump (taken every morning) we can see that the ByteBuffer only grows, until eventually reaches out of memory.

So you may be hitting this other bug:
https://github.com/eclipse/jetty.project/issues/3871

But AFAIK, MappedByteBufferPool does not leak, so again it's something
that we need proof of - just you saying that MappedByteBufferPool
retains memory until OOME is not enough.

MappedByteBufferPool retained memory can be constrained via
MappedByteBufferPool.maxHeapMemory and
MappedByteBufferPool.maxDirectMemory.

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top