agentscope-ai / agentscope-ai/QwenPaw
MCP process leak: chrome-devtools-mcp and tavily-mcp cause memory explosion
- 主要语言
- Python
- 星标
- 34.9k
- 派生
- 3.1k
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 225
描述
## Problem Description
After updating CoPaw, the system has a serious process leak issue. The `node.exe` process count grows from normal to 40+ processes, each taking 75-130 MB memory, consuming several GB of RAM.
## Reproduction Steps
1. Run CoPaw with multiple agents
2. Use any MCP functionality (chrome-devtools-mcp, tavily-mcp)
3. Observe task manager - node.exe processes keep growing
## Log Analysis
CoPaw logs show MCP clients frequently disconnecting and reconnecting:
```
MCP client 'tavily_mcp' session interrupted while listing tools; trying recovery
Stopping MCP client: tavily_mcp
MCP client lifecycle task exited: tavily_mcp
MCP client connected: tavily_mcp
```
Each reconnect starts new watchdog child processes from `chrome-devtools-mcp`, but old processes are not properly terminated, causing accumulation.
## Environment
- CoPaw version: Latest
- Node.js: v22.10.0
- MCP plugins:
- chrome-devtools-mcp@0.2.6
- tavily-mcp (latest)
- Agent count: 8 (default, code_agent, data_agent, research_agent, router_agent, writer_agent, kids_english_translator, CoPaw_QA_Agent)
## Temporary Workaround
Manually terminate leaking processes:
```bash
wmic process where "name='node.exe' and CommandLine like '%%chrome-devtools%%'" call terminate
wmic process where "name='node.exe' and CommandLine like '%%tavily%%'" call terminate
```
## Expected Behavior
MCP processes should be properly cleaned up when connections close, no process accumulation should occur.
## Impact
- System RAM exhausted
- CPU usage abnormally high
- CoPaw runs slowly or freezes
贡献指南
评估
这个 Issue 还没有评估数据。