{"record":{"id":"802062c585907cf7","repo":"t8y2/dbx","slug":"timed-out-during-method","errorCode":null,"errorMessage":"timed out during {method}","messagePattern":"timed out during (.+?)","errorType":"exception","errorClass":"TimeoutError","httpStatus":null,"severity":"error","filePath":"agents/drivers/argo-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/argo-go/bench/agent_compare.py#L81-L117","documentation":"AgentProcess.call waits on a one-slot queue for the JSON-RPC response with BENCH_RPC_TIMEOUT (default 180s); when queue.get raises queue.Empty the call converts it into a TimeoutError naming the method. This means the request was written to the agent's stdin but no response line arrived in time.","triggerScenarios":"Calling any method whose handler blocks longer than BENCH_RPC_TIMEOUT: huge result sets in execute_query, agent deadlock, agent busy on a previous synchronous request, hung JDBC/backend connection, or response id mismatch so the pending queue never receives the reply.","commonSituations":"Benchmarking pages queries over a slow remote Hive/TDengine where one query exceeds 180s; agent deadlocks on concurrent requests; wrong BENCH_RPC_TIMEOUT for a large max_rows workload; agent silently dropped the response due to a protocol bug.","solutions":["Increase the BENCH_RPC_TIMEOUT environment variable (e.g. 600) for long-running workloads","Reduce workload size (max_rows / page_size / number of queries) so each call finishes within the timeout","Check agent logs/stderr for a hang or deadlock and fix the agent's concurrency handling","Verify the agent echoes the request `id` back so the response is routed to the pending queue","Add retry logic around call() in the harness for transient slow queries"],"exampleFix":"// before\nresponse = response_queue.get(timeout=env_float(\"BENCH_RPC_TIMEOUT\", 180.0))\n// after\n# shell: export BENCH_RPC_TIMEOUT=600  # or in harness\nresponse = response_queue.get(timeout=env_float(\"BENCH_RPC_TIMEOUT\", 600.0))","handlingStrategy":"try-catch","validationCode":"timeout = float(os.getenv(\"BENCH_RPC_TIMEOUT\", \"180\"))\nassert timeout > expected_query_seconds, \"increase BENCH_RPC_TIMEOUT for this workload\"","typeGuard":null,"tryCatchPattern":"try:\n    result = process.call(method, params)\nexcept TimeoutError as e:\n    print(f\"{method} exceeded BENCH_RPC_TIMEOUT: {e}\")\n    process.close()\n    process = AgentProcess(process.candidate)  # dead/hung agent must be recycled","preventionTips":["Size BENCH_RPC_TIMEOUT above the slowest expected query in the workload","Shrink max_rows/page_size so every call fits the timeout","Watch for repeated timeouts on one method — that indicates an agent deadlock, not slowness","Always close and restart the agent after a timeout; its state is undefined"],"tags":["timeout","rpc","ipc","benchmark"],"backgroundTag":"rpc-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"}