#461 Memory Leak: Unbounded circuit breaker caches in docker/client.py, email_tool.py, llm.py
Description
EditMultiple files have unbounded module-level circuit breaker caches without TTL or max size limits:
1. engine/tools/docker/client.py:38-39 - _circuit_breaker_cache dict
2. engine/tools/email_tool.py:39,48-59 - _circuit_breaker_cache dict
3. engine/tools/llm.py:72-73,88-106 - _circuit_breaker_cache dict
Pattern: Each workflow_run_id gets its own CircuitBreaker instance cached forever. In long-running workers processing many workflows, this leads to unbounded memory growth.
FIX: Apply same TTL + max_size + LRU eviction pattern used in activity_worker.py CB cache fix.
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...