t8y2/dbx · error · TimeoutError
RSS probe timed out: {'; '.join(stderr_lines)}
Error message
RSS probe timed out: {'; '.join(stderr_lines)} What it means
measure_rss() waits up to BENCH_READY_TIMEOUT (default 30s) for the probe's stdout to emit a JSON line with ready=true. If the deadline passes without a ready signal, the for/else raises TimeoutError listing accumulated stderr lines — the probe is alive but never reported readiness.
Source
Thrown at agents/drivers/iotdb/bench/run.py:159
assert process.stderr is not None
stderr_lines.extend(line.rstrip() for line in process.stderr)
threading.Thread(target=drain_stderr, daemon=True).start()
try:
assert process.stdout is not None
deadline = time.monotonic() + env_float("BENCH_READY_TIMEOUT", 30.0)
while time.monotonic() < deadline:
line = process.stdout.readline()
if line == "" and process.poll() is not None:
raise RuntimeError(f"RSS probe exited early: {'; '.join(stderr_lines)}")
try:
payload = json.loads(line)
except json.JSONDecodeError:
continue
if payload.get("ready") is True:
break
else:
raise TimeoutError(f"RSS probe timed out: {'; '.join(stderr_lines)}")
time.sleep(0.2)
completed = subprocess.run(
["ps", "-o", "rss=", "-p", str(process.pid)],
text=True,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
check=True,
)
return float(completed.stdout.strip())
finally:
process.terminate()
try:
process.wait(timeout=5)
except subprocess.TimeoutExpired:
process.kill()
process.wait(timeout=5)
View on GitHub (pinned to c0390bff16)
Solutions
- Increase the timeout: export BENCH_READY_TIMEOUT=120
- Ensure the probe flushes stdout (print(..., flush=True)) when printing the ready JSON
- Verify the readiness payload key is exactly ready with value true in the tool version in use
- Check stderr in the message for hints the probe is stuck (waiting on a resource/port)
- Run the probe manually to observe how long readiness actually takes
Example fix
// before export BENCH_READY_TIMEOUT=30 # TimeoutError: RSS probe timed out // after export BENCH_READY_TIMEOUT=120
Defensive patterns
Strategy: retry
Validate before calling
def preflight_ready_latency(cmd: list[str], env: dict) -> float:
start = time.monotonic()
# time a manual run to learn real readiness latency, then size the timeout
subprocess.run(cmd, env=env, capture_output=True, text=True)
return time.monotonic() - start # set BENCH_READY_TIMEOUT well above this Try / catch
try:
rss = measure_rss(command, environment)
except TimeoutError as e:
print(f"probe never reported ready:\n{e}")
print("retrying with a larger timeout")
environment["BENCH_READY_TIMEOUT"] = "120"
rss = measure_rss(command, environment) Prevention
- Set BENCH_READY_TIMEOUT generously for cold starts (JVM/db init can exceed 30s)
- Ensure the probe flushes stdout after printing the ready JSON when stdout is a pipe
- Verify the readiness payload uses key ready with value true for your tool version
- Time readiness manually once per environment and set the timeout to several times that
When it happens
Trigger: The probe keeps running but never prints {"ready": true} within the deadline: slow startup, readiness line sent to stderr, JSON payloads that never include ready=true, or stdout buffering delaying the line past the timeout.
Common situations: BENCH_READY_TIMEOUT too short for a cold-starting JVM/database; tool version emits a different readiness key; output block-buffered because stdout is a pipe without flush; probe stuck initializing (e.g. waiting on its own dependency).
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- timed out waiting for agent readiness
- timed out waiting for agent readiness
- timed out during {method}
- timed out waiting for agent readiness
- agent exited before ready
AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05).
Data as JSON: /api/errors/8b6948329ff443d1.
Report an issue: GitHub.