t8y2/dbx · error
agent request timed out
Error message
agent request timed out
What it means
An agent RPC that does not receive a response within a fixed 30-second window times out; the pending request is removed and this error returned. It indicates the agent process is hung, dead, or too slow rather than returning an error reply.
Source
Thrown at agents/drivers/kingbase-go/bench/agent_compare.go:249
if err != nil {
return nil, err
}
process.writeMu.Lock()
_, err = process.stdin.Write(append(payload, '\n'))
process.writeMu.Unlock()
if err != nil {
process.pending.Delete(id)
return nil, err
}
select {
case response := <-channel:
if response.Error != nil {
return nil, errors.New(response.Error.Message)
}
return response.Result, nil
case <-time.After(30 * time.Second):
process.pending.Delete(id)
return nil, errors.New("agent request timed out")
}
}
func (process *agentProcess) close() error {
_, _ = process.call("shutdown", map[string]any{})
_ = process.stdin.Close()
return process.command.Wait()
}
func runQueryBenchmark(process *agentProcess, duration time.Duration, concurrency int, sqlText string, maxRows int, sampleMemory bool) benchmarkResult {
var operations atomic.Int64
var failures atomic.Int64
var peakRSS atomic.Int64
stopMemory := make(chan struct{})
if sampleMemory {
peakRSS.Store(readRSSKB(process.command.Process.Pid))
go func() {
ticker := time.NewTicker(100 * time.Millisecond)View on GitHub (pinned to c0390bff16)
Solutions
- Check whether the agent process is alive (logs, exit status) and restart it if it crashed or hung
- Reduce query workload or increase the 30s timeout constant for legitimately long operations
- Ensure the agent always writes exactly one response per request, even on internal errors
Example fix
// before case <-time.After(30 * time.Second): // after timeout := 60 * time.Second // configurable for long-running queries case <-time.After(timeout):
Defensive patterns
Strategy: retry
Validate before calling
if process.exited() { return errors.New("agent process is not running; restart before calling") } Try / catch
res, err := process.call(method, args); if err != nil && err.Error() == "agent request timed out" { // restart agent and retry once with a longer deadline
} Prevention
- Make the 30s timeout configurable for long-running queries
- Monitor the agent process health (liveness check) and restart it on hang/crash
- Ensure the agent replies to every request exactly once, including error paths
When it happens
Trigger: Calling process.call (from close, warmup, benchmarkOneConnection, cleanupQueryPage, etc.) when the agent writes no reply to the response channel within 30 seconds.
Common situations: The agent process crashed or deadlocked so the reply never arrives; a long-running query exceeds 30s; the agent's stdout reply was lost or blocked; slow machine/IO under benchmark load.
Understand the failure class
Background: Request timed out: what client-side request timeouts mean across libraries (Request timed out, TIMED_OUT, APITimeoutError) — this error's family across 39 libraries.
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- timed out during {method}
- timed out waiting for agent readiness
- ${response.Error.Message}
- Query timeout cannot be negative: " + timeoutSecs
- DBX MCP process is not available
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/c7236e96e3e9a320.
Report an issue: GitHub.