nexu-io/open-design · error · SubprocTimeout
Command {cmd[0]} timed out after {timeout}s
Error message
Command {cmd[0]} timed out after {timeout}s What it means
SubprocTimeout raised by the run helper in subproc.py when proc.communicate(timeout=timeout) raises subprocess.TimeoutExpired. The helper kills the whole process group (SIGTERM via os.killpg, or proc.kill as fallback), waits up to 5s for reaping, then re-raises as SubprocTimeout so callers can distinguish timeouts from normal exit codes.
Source
Thrown at design-templates/last30days/scripts/lib/subproc.py:88
preexec_fn=preexec,
env=env,
)
if on_pid is not None:
try:
on_pid(proc.pid)
except Exception:
pass
try:
stdout, stderr = proc.communicate(timeout=timeout)
except subprocess.TimeoutExpired:
try:
os.killpg(os.getpgid(proc.pid), signal.SIGTERM)
except (ProcessLookupError, PermissionError, OSError):
proc.kill()
proc.wait(timeout=5)
raise SubprocTimeout(f"Command {cmd[0]} timed out after {timeout}s")
return SubprocResult(
returncode=proc.returncode,
stdout=stdout or "",
stderr=stderr or "",
)
View on GitHub (pinned to 5be4028344)
Solutions
- Raise the timeout argument to match the workload (depth=deep needs more headroom).
- Reproduce the failing command in a shell to see where it stalls (network, auth prompt, deadlock).
- Ensure the child does not expect interactive input; pass all required credentials via env/args.
- Catch SubprocTimeout and degrade gracefully (skip that source) instead of aborting the whole pipeline.
Example fix
# before
res = run(['bird-scrape', query], timeout=30) # deep transcription stalls
# after
from lib.subproc import SubprocTimeout
try:
res = run(['bird-scrape', query], timeout=180)
except SubprocTimeout:
res = None # skip this source, continue pipeline Defensive patterns
Strategy: try-catch
Validate before calling
null
Type guard
null
Try / catch
from lib.subproc import run, SubprocTimeout
try:
res = run(cmd, timeout=timeout)
except SubprocTimeout:
res = None # degrade: skip this source, keep the pipeline running Prevention
- Size the timeout to the workload (depth=deep needs more time).
- Ensure external CLIs receive all input via env/args, never interactive prompts.
- Reproduce the stalled command manually to find the bottleneck before raising the timeout.
When it happens
Trigger: Calling run(cmd, timeout=N) where the child process does not exit within N seconds. Used by backends like bird_x.py to spawn external CLIs (e.g. the bird scraper) that hang on network/auth issues.
Common situations: External CLI blocked on a network call, an interactive prompt, or a deadlock. Timeout value too low for the workload (e.g. transcription-heavy depth=deep). Child waiting on stdin that was never closed.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- git command failed
- Open Design was launched headlessly but its daemon did not b
- unsupported resource URI: ${uri}
- volcengine task did not finish in time (last status: ${lastS
- Vela video task timed out after ${totalTimeoutMs}ms; last st
AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12).
Data as JSON: /api/errors/2f82f70e84aa8d2e.
Report an issue: GitHub.