fix(mcp): use uniform session memory_mb=1024 to avoid BoxSessionConflictError

All MCPs share one Box session (mcp-shared). When session memory_mb differed
by command type (512 for python, 1024 for node), the second MCP to call
create_session raised BoxSessionConflictError. Fix: always use 1024 MB for
the shared session so python and node MCPs coexist without conflict.
This commit is contained in:
dadachann
2026-07-03 21:46:46 -04:00
parent c5d7e3dcb1
commit 9fb4d27333
@@ -146,11 +146,7 @@ class BoxStdioSessionRuntime:
# load WebAssembly modules (llhttp) on startup; the default 512 MB # load WebAssembly modules (llhttp) on startup; the default 512 MB
# cgroup_mem_max is too small and causes OOM kills (return_code=137). # cgroup_mem_max is too small and causes OOM kills (return_code=137).
# Auto-bump to 1024 MB when the runner is npx/bunx/pnpm dlx. # Auto-bump to 1024 MB when the runner is npx/bunx/pnpm dlx.
memory_mb=( memory_mb=self.config.memory_mb or 1024,
(self.config.memory_mb or 1024)
if self.server_config.get('command', '') in ('npx', 'bunx', 'pnpm')
else self.config.memory_mb
),
pids_limit=self.config.pids_limit, pids_limit=self.config.pids_limit,
persistent=True, persistent=True,
) )