-
Notifications
You must be signed in to change notification settings - Fork 973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Buffer size #344
Comments
That is the default global buffer pool (16 MB) shared by all channels and handlers. If you switch on debug logging, all the heap parameters are reported when DotNetty starts. |
If it is global, is it normal that it is created for each client? |
The global buffer pool lasts for the life time of the application and shared across all channels. |
Okay, I did |
The global buffer pool lasts for the entire lifetime of the applications. The idea is to eliminate the GC pressure to improve performance. This is by design. You can tune the size down a bit though. |
what do you mean by this?
If you're not accessing pooled allocator, it should not be used at all and should not allocate. What memory are you referring to here? |
I meant a memory leak. The buffer is not destroyed with the client turned off. Even if I use UnpooledByteBufferAllocator |
@fler Or use the below code to lower the memory used by PooledByteBufferAllocator. |
@fler could you pls check what holds the buffer? I.e. take a process dump and inspect path to root for the buffer. |
@fler did you manage to solve this issue? I'm also seeing memory not being released after a client disconnects and not being reused. |
Here's what I can see in taking memory in the heap:
There's also a big chunk on I tried setting It's kind of frustrating, as a chunk is allocated every time a new connection comes in, but it isn't released when the connection drops. Manual calls to the garbage collector don't produce any results either. |
Through the memory dumps, I traced it to here
This is using unpooled allocator. |
The same question, is there a solution? |
5 years later and it still is not fixed. Why does the memory stay allocated after the connection is dropped? Any solutions? |
My application "eats" 22 MB per client. I found that this is because of the giant buffer size (16777216). How can I set the buffer size?
The text was updated successfully, but these errors were encountered: