#461 Memory Leak: Unbounded circuit breaker caches in docker/client.py, email_tool.py, llm.py

closed high Created 2025-12-17 01:11 · Updated 2025-12-17 01:15

Description

Edit
Multiple 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 All
Loading audit history...