Long-running tool calls starve the stdio worker pool #23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
On 2026-09-19 every call through the shared hub (
mcp-hub-light, ~50 Claude sessions on one stdio backend) timed out twice within an hour, includingget_forgejo_mcp_server_version. The process was alive and idle. A restart healed it each time.Root cause
tools/callon a fixed pool of 5 workers (server/stdio.go:403workerPoolSize: 5);ServeStdiois called withoutWithWorkerPoolSize(operation/operation.go:133).wait_for_runblocks a worker for up to 1800 s by default (operation/actions/wait_for_run.go:31).notifications/cancelledto the backend when a client gives up, and mcp-go v0.44 does not handle it either. A caller that times out and retries adds another blocked worker.wait_for_runcalls were in progress, each loggingwait cancelled by caller (context done)as stdin closed. That is more than 5 workers, so every short call was stuck in the queue.pkg/forgejo/forgejo.goforgejo.NewClientwithoutSetHTTPClient), so one stalled TCP read could also hold a worker indefinitely.Acceptance criteria
wait_for_run, full-scanlist_workflow_runs,list_run_jobs, run/job log fetches) share a bounded number of slots. When the slots are full they fail immediately with a clear message instead of queueing.get_forgejo_mcp_server_versionstill answers in under 2 s.Refs Philflow/auto-issue-orchestrator#215