The rate limiter in app.py doesn't clean up stale IP address keys from the rate_limit_storage dictionary. This leads to unbounded memory growth and could eventually crash the process on long-running deployments. We need a cleanup mechanism when the storage exceeds a certain threshold.
The rate limiter in
app.pydoesn't clean up stale IP address keys from therate_limit_storagedictionary. This leads to unbounded memory growth and could eventually crash the process on long-running deployments. We need a cleanup mechanism when the storage exceeds a certain threshold.