Memory Leak and CPU Spike Issues with LiteLLM (FastAPI Setup) #15100
Replies: 4 comments 1 reply
-
| What we are also seeing are sessions closing unexpectedly and may be consuming resources. | 
Beta Was this translation helpful? Give feedback.
-
| cc @AlexsanderHamir on this thread | 
Beta Was this translation helpful? Give feedback.
-
| Many thanks @ishaan-jaff would try this and get back to you | 
Beta Was this translation helpful? Give feedback.
-
| I believe this should be fixed with the work done in v1.78.0 w/ session leaks - https://docs.litellm.ai/release_notes/v1-78-0#performance--loadbalancing--reliability-improvements | 
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We’re experiencing heavy memory leaks when using LiteLLM in a FastAPI-based service.
Over time, the containers gradually consume all available memory (12 GB) and eventually crash, leading to service degradation. We also occasionally see CPU spikes to 100% before the container is killed.
We’ve confirmed that the leak isn’t coming from other parts of our stack, and it appears linked to LiteLLM’s runtime behavior.
Is there any known issue with LiteLLM related to memory usage, or any recommended fine-tuning or configuration to prevent this?
Beta Was this translation helpful? Give feedback.
All reactions