You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf: InMemoryFileStore LRU cache is unbounded per conversation #3146
Each LocalConversation gets its own InMemoryFileStore with an LRU cache. The cache has no configured maximum size. With N conversations on a server, each accumulating event data, the total memory from file store caches grows without bound.
Location:io/memory.py
Evidence
Code review. Each event is stored as a JSON string in the file store. A conversation with 2000 events at ~500 bytes each = ~1 MB per conversation in the cache alone. With 500 conversations: ~500 MB just in caches.
Severity: High
Impact of fix
Bounded memory per conversation, predictable server memory usage.
Suggested fixes
Configure a max cache size per store
Or use a shared LRU across conversations with a global memory budget
Activity