Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix PROXY_BATCH_WRITE_AT

Ishaan Jaffer27502cfdfd33
diff --git a/litellm/constants.py b/litellm/constants.py
index 37bf68d5cde..682166be2ff 100644
--- a/litellm/constants.py
+++ b/litellm/constants.py
@@ -1050,9 +1050,7 @@ PROXY_BATCH_POLLING_INTERVAL = int(os.getenv("PROXY_BATCH_POLLING_INTERVAL", 360
PROXY_BUDGET_RESCHEDULER_MAX_TIME = int(
os.getenv("PROXY_BUDGET_RESCHEDULER_MAX_TIME", 605)
)
-# MEMORY LEAK FIX: Increased from 10s to 30s minimum to prevent memory issues with APScheduler
-# Very frequent intervals (<30s) can cause memory leaks in APScheduler's internal functions
-PROXY_BATCH_WRITE_AT = int(os.getenv("PROXY_BATCH_WRITE_AT", 30)) # in seconds, increased from 10
+PROXY_BATCH_WRITE_AT = int(os.getenv("PROXY_BATCH_WRITE_AT", 10)) # in seconds, increased from 10
# APScheduler Configuration - MEMORY LEAK FIX
# These settings prevent memory leaks in APScheduler's normalize() and _apply_jitter() functions