Memory issues with newer versions of Uvicorn #2794
Unanswered
Apakottur
asked this question in
Potential Issue
Replies: 2 comments 6 replies
-
|
Can you try this: #2795 ? |
Beta Was this translation helpful? Give feedback.
2 replies
-
|
I spent some time on this, and I'm still not able to reproduce it. What is your Python version (with patch included)? Based on the evidence, it seems it's not related to websockets, but to HTTP, so the httptools protocol is being used, and I'm not sure there's a leak, but it seems that the context is being created more than once - I'm not sure if in the same connection, given that the keep alive seems to have a high number - which may indicate why we didn't have any other user reporting this. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
-
Hello and thank you for this great project.
We are using running a Uvicorn + Starlette server, which has been stable for years now without any issues.
We recently tried to upgrade from
uvicorn[standard]==0.38.0touvicorn[standard]==0.40.0, but that results in our server crashing due to it running out of memory.Here's how it looks on AWS ECS:

At 11:15 we deploy the new uvicorn version, and you can see that the memory usage never stabilizes, resulting in the server crashing.
The uvicorn update is the only change between these two deployments, so we are almsot certain that it's the root problem.
This is how we run uvicorn:
We are using both REST API and Websockets on this server.
Has there been any recent changes that might lead to this? How can we debug this further?
Beta Was this translation helpful? Give feedback.
All reactions