You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a backend that provides multiple endpoints for thousands of connections, and I am noticing a memory increase/leak that I am not able to fully pinpoint the root cause.
However, with the following minimal example, I am noticing that aiohttp is not fully releasing the memory used. I.e. the process (the backend) starts using almost negligible memory, and when I run the client multiple times I am able of increasing the memory used by the backend that never decreases.
If you play with num_requests, for instance double it, you can see that the memory of the server increases even more compared with the 10000 and does not decrease.
To Reproduce
Run the backend
Run the client
Play with the number of requests
This is while checking the memory usage of the process.
See #4618 and verify trimming the memory as per the end of that discussion. We've spent many hours in the past looking at these issues which have turned out to be nothing. I don't think anybody here is going to spend more time looking at this unless you someone does the work first to verify there's a real memory issue and narrows down where the problem is. I'd note that there are caches (DNS etc.), so a small increase in memory is expected.
Describe the bug
Hey everyone,
I have a backend that provides multiple endpoints for thousands of connections, and I am noticing a memory increase/leak that I am not able to fully pinpoint the root cause.
However, with the following minimal example, I am noticing that aiohttp is not fully releasing the memory used. I.e. the process (the backend) starts using almost negligible memory, and when I run the client multiple times I am able of increasing the memory used by the backend that never decreases.
If you play with num_requests, for instance double it, you can see that the memory of the server increases even more compared with the 10000 and does not decrease.
To Reproduce
This is while checking the memory usage of the process.
Expected behavior
The memory should be released.
Logs/tracebacks
Python Version
aiohttp Version
multidict Version
propcache Version
yarl Version
OS
Ubuntu 24.04.2 LTS
Related component
Server
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: