Bug Report
App Version
v3.11.3
Description
When multiple concurrent requests (>5) trigger team_tasks(action="search"), all requests stuck indefinitely at the tool call. The system works normally with <5 concurrent requests but completely stalls under higher load.
Error Log
No explicit error log. Requests hang indefinitely at team_tasks tool call.
Trace shows: tool_call team_tasks - status: running
Steps to Reproduce
- Deploy goclaw with embedding provider configured (OpenAI)
- Send 10+ concurrent chat requests that trigger
team_tasks(action="search")
- Observe that requests 6+ hang indefinitely while requests 1-5 may complete
Expected Behavior
All concurrent requests should complete within reasonable time (~1-5 seconds for search).
Actual Behavior
- Requests 1-2: Complete normally
- Requests 3-5: Slow but complete
- Requests 6+: Stuck indefinitely, never complete
Root Cause
The OpenAIEmbeddingProvider in internal/providers/embedding_openai.go uses a default http.Client without custom transport configuration:
client: &http.Client{Timeout: 60 * time.Second}
Go's default http.Transport has MaxIdleConnsPerHost: 2, causing HTTP connection pool starvation when multiple requests need to call the embedding API concurrently. Reference: https://github.com/golang/go/blob/master/src/net/http/transport.go#L62
Fix
Configure custom http.Transport with higher connection limits:
client: &http.Client{
Timeout: 60 * time.Second,
Transport: &http.Transport{
MaxIdleConns: 100,
MaxIdleConnsPerHost: 30,
IdleConnTimeout: 90 * time.Second,
},
},
Additional Context
- Affects any deployment using embedding provider for team task search
- Connection pool exhaustion causes cascading failures as requests queue up
- Each blocked request holds resources for up to 60 seconds (client timeout)
PR: #1123
Bug Report
App Version
v3.11.3Description
When multiple concurrent requests (>5) trigger
team_tasks(action="search"), all requests stuck indefinitely at the tool call. The system works normally with <5 concurrent requests but completely stalls under higher load.Error Log
No explicit error log. Requests hang indefinitely at team_tasks tool call.
Trace shows: tool_call team_tasks - status: running
Steps to Reproduce
team_tasks(action="search")Expected Behavior
All concurrent requests should complete within reasonable time (~1-5 seconds for search).
Actual Behavior
Root Cause
The
OpenAIEmbeddingProviderininternal/providers/embedding_openai.gouses a defaulthttp.Clientwithout custom transport configuration:Go's default http.Transport has MaxIdleConnsPerHost: 2, causing HTTP connection pool starvation when multiple requests need to call the embedding API concurrently. Reference: https://github.com/golang/go/blob/master/src/net/http/transport.go#L62
Fix
Configure custom http.Transport with higher connection limits:
Additional Context
PR: #1123