t8y2/dbx · error · TimeoutError

timed out during {method}

Error message

timed out during {method}

What it means

call() waits on a per-request queue for the agent's JSON-RPC response, with BENCH_RPC_TIMEOUT seconds (default 180). If no response arrives, queue.Empty is caught and re-raised as TimeoutError naming the method. This indicates the agent accepted the request but never answered within the window.

Source

Thrown at agents/drivers/hive-go/bench/agent_compare.py:99

        with self.request_lock:
            self.request_id += 1
            request_id = self.request_id
            response_queue: queue.Queue = queue.Queue(maxsize=1)
            self.pending[request_id] = response_queue
        request = {
            "jsonrpc": "2.0",
            "id": request_id,
            "method": method,
            "params": params or {},
        }
        try:
            assert self.process.stdin is not None
            with self.write_lock:
                self.process.stdin.write(json.dumps(request, separators=(",", ":")) + "\n")
                self.process.stdin.flush()
            response = response_queue.get(timeout=env_float("BENCH_RPC_TIMEOUT", 180.0))
        except queue.Empty as error:
            raise TimeoutError(self._failure(f"timed out during {method}")) from error
        finally:
            with self.request_lock:
                self.pending.pop(request_id, None)
        if isinstance(response, Exception):
            raise response
        if response.get("error") is not None:
            raise RuntimeError(
                f"{self.candidate.name} {method}: "
                f"{json.dumps(response['error'], ensure_ascii=False)}"
            )
        return response.get("result")

    def rss_kib(self) -> int:
        if self.candidate.rss_command:
            output = subprocess.check_output(
                self.candidate.rss_command,
                shell=True,
                text=True,

View on GitHub (pinned to c0390bff16)

Solutions

  1. Raise BENCH_RPC_TIMEOUT to exceed the expected worst-case method duration
  2. Check the agent's logs/DB for a stuck or slow query and optimize or cancel it
  3. Reduce workload size (max_rows, pages) so calls complete within the timeout
  4. Verify network stability between the agent and the database

Example fix

// before
BENCH_RPC_TIMEOUT=180 python bench/agent_compare.py
// after
BENCH_RPC_TIMEOUT=600 python bench/agent_compare.py
Defensive patterns

Strategy: retry

Validate before calling

import socket
def preflight_rpc_timeout() -> float:
    # ensure the configured timeout exceeds expected worst-case method duration
    t = float(os.getenv("BENCH_RPC_TIMEOUT", "180"))
    assert t >= expected_max_method_seconds(), "BENCH_RPC_TIMEOUT too low for workload"
    return t

Try / catch

try:
    result = process.call("benchmark_workload", params)
except TimeoutError as e:
    if "timed out during" in str(e):
        cancel_server_side(params)
        os.environ["BENCH_RPC_TIMEOUT"] = "600"
        result = process.call("benchmark_workload", params)
    else:
        raise

Prevention

When it happens

Trigger: Calling a method whose server-side execution exceeds BENCH_RPC_TIMEOUT — e.g. a long-running query, a huge benchmark run, or an agent deadlocked/lost its DB connection while processing.

Common situations: Benchmarking very large row counts over a slow network to Hive/TDengine; agent stuck waiting on an overloaded database; agent deadlocked (e.g. waiting for a page fetch that never completes); the default 180s being too low for a large JDBC workload.

Understand the failure class

Related errors


AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05). Data as JSON: /api/errors/cfb191e20146849d. Report an issue: GitHub.