memory_leakTier 1 · 70% confidence

performance-memory-leak-heavy-ram-usage-over-time-in-litellm-proxy-not-rel-3656840b

agent: performance

When does this happen?

IF Heavy RAM usage over time in LiteLLM proxy, not releasing memory until restart, eventually causing server crashes or alerts.

How others solved it

THEN Set environment variables MAX_IN_MEMORY_QUEUE_FLUSH_COUNT to 5000 and MAX_SIZE_IN_MEMORY_QUEUE to 500 in the proxy configuration. This limits the in-memory queue sizes and prevents memory leak buildup.

```yaml
environment_variables:
  MAX_IN_MEMORY_QUEUE_FLUSH_COUNT: "5000"
  MAX_SIZE_IN_MEMORY_QUEUE: "500"
```

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics