{"record":{"id":"cfb191e20146849d","repo":"t8y2/dbx","slug":"timed-out-during-method-cfb191","errorCode":null,"errorMessage":"timed out during {method}","messagePattern":"timed out during (.+?)","errorType":"exception","errorClass":"TimeoutError","httpStatus":null,"severity":"error","filePath":"agents/drivers/hive-go/bench/agent_compare.py","lineNumber":99,"sourceCode":"        with self.request_lock:\n            self.request_id += 1\n            request_id = self.request_id\n            response_queue: queue.Queue = queue.Queue(maxsize=1)\n            self.pending[request_id] = response_queue\n        request = {\n            \"jsonrpc\": \"2.0\",\n            \"id\": request_id,\n            \"method\": method,\n            \"params\": params or {},\n        }\n        try:\n            assert self.process.stdin is not None\n            with self.write_lock:\n                self.process.stdin.write(json.dumps(request, separators=(\",\", \":\")) + \"\\n\")\n                self.process.stdin.flush()\n            response = response_queue.get(timeout=env_float(\"BENCH_RPC_TIMEOUT\", 180.0))\n        except queue.Empty as error:\n            raise TimeoutError(self._failure(f\"timed out during {method}\")) from error\n        finally:\n            with self.request_lock:\n                self.pending.pop(request_id, None)\n        if isinstance(response, Exception):\n            raise response\n        if response.get(\"error\") is not None:\n            raise RuntimeError(\n                f\"{self.candidate.name} {method}: \"\n                f\"{json.dumps(response['error'], ensure_ascii=False)}\"\n            )\n        return response.get(\"result\")\n\n    def rss_kib(self) -> int:\n        if self.candidate.rss_command:\n            output = subprocess.check_output(\n                self.candidate.rss_command,\n                shell=True,\n                text=True,","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/hive-go/bench/agent_compare.py#L81-L117","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Raise BENCH_RPC_TIMEOUT to exceed the expected worst-case method duration","Check the agent's logs/DB for a stuck or slow query and optimize or cancel it","Reduce workload size (max_rows, pages) so calls complete within the timeout","Verify network stability between the agent and the database"],"exampleFix":"// before\nBENCH_RPC_TIMEOUT=180 python bench/agent_compare.py\n// after\nBENCH_RPC_TIMEOUT=600 python bench/agent_compare.py","handlingStrategy":"retry","validationCode":"import socket\ndef preflight_rpc_timeout() -> float:\n    # ensure the configured timeout exceeds expected worst-case method duration\n    t = float(os.getenv(\"BENCH_RPC_TIMEOUT\", \"180\"))\n    assert t >= expected_max_method_seconds(), \"BENCH_RPC_TIMEOUT too low for workload\"\n    return t","typeGuard":null,"tryCatchPattern":"try:\n    result = process.call(\"benchmark_workload\", params)\nexcept TimeoutError as e:\n    if \"timed out during\" in str(e):\n        cancel_server_side(params)\n        os.environ[\"BENCH_RPC_TIMEOUT\"] = \"600\"\n        result = process.call(\"benchmark_workload\", params)\n    else:\n        raise","preventionTips":["Set BENCH_RPC_TIMEOUT relative to workload size (rows, pages, network RTT)","Check for stuck queries/deadlocks in the agent's DB session when timeouts recur","Reduce workload size before scaling timeouts blindly","Log method start/end times agent-side to distinguish slow work from hangs"],"tags":["timeout","rpc","python","subprocess"],"backgroundTag":"rpc-request-timeout","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}