mirror of
https://github.com/wolfpld/tracy.git
synced 2026-09-18 16:24:23 +00:00
live_connect wrapped Worker(addr, port) with no memoryLimit, so the binding default (-1, unlimited) applied. A long-lived live session on a busy target grows unbounded -- every zone/message/ memory event stays resident until disconnect -- and can OOM-kill the whole server process rather than just that one instance. Worker already has a graceful cap: TracyWorker.cpp's receive loop checks memoryLimit and calls QueryTerminate() + a clean disconnect once exceeded, instead of continuing to grow. Just wasn't wired up from Python. Adds memory_limit_mb to live_connect (defaults to TRACY_MCP_LIVE_MEMORY_LIMIT_MB, 8192 if unset; 0 disables), converts to bytes for the Worker constructor, and reports the active limit in the connect response.