-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Kestrel memory pool does not reliably decrease with load #24958
Comments
Kestrel will pool internal buffer up to a limit and will not let them go. We should consider having a settable limit or release strategy for the pool. cc @halter73 |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Thanks for contacting us. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Closing this as a duplicate of #27394 |
Describe the bug
While load testing a new service using SignalR, we noticed that memory usage does not always decrease after connections drop off. Sometimes it decreases a minute or two after the connections end, but sometimes it just never recovers. This causes us two problems:
This shows memory usage increasing with number of connections (tracked using the
OnConnectedAsync
/OnDisconnectedAsync
methods of ourHub
), but not reliably decreasing afterwards:The service is running in an Alpine 3.12 docker container, but we notice similar behaviour when running locally in Windows 10. We initially assumed this was a simple memory leak, but when making a large number of connections over time while keeping the number of concurrent connections low, memory usage does not increase.
When taking a heap dump, we see memory fairly dominated by
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets!Buffers.MemoryPoolBlock
:To Reproduce
Further technical details
mcr.microsoft.com/dotnet/core/aspnet:3.1.6-alpine3.12
mcr.microsoft.com/dotnet/core/sdk:3.1.302-alpine3.12
The text was updated successfully, but these errors were encountered: