MiniMax-AI/skills · warning · SystemExit
Timeout after {max_wait}s. task_id={task_id}, check manually
Error message
Timeout after {max_wait}s. task_id={task_id}, check manually. What it means
poll_task() looped until elapsed >= max_wait (default 600s) without reaching Success or Fail. The task may still be processing server-side; the task_id is included so it can be queried/resumed manually later.
Source
Thrown at skills/gif-sticker-maker/scripts/minimax_video.py:143
data = resp.json()
_check_resp(data)
status = data.get("status", "")
file_id = data.get("file_id", "")
if status == "Success":
if not file_id:
raise SystemExit("Task succeeded but no file_id returned")
print(f" Done! file_id={file_id}")
return file_id
elif status == "Fail":
raise SystemExit(f"Video generation failed: {json.dumps(data, indent=2)}")
else:
print(f" [{elapsed}s] Status: {status}...")
time.sleep(interval)
elapsed += interval
raise SystemExit(f"Timeout after {max_wait}s. task_id={task_id}, check manually.")
def download_video(file_id: str, output_path: str):
"""Retrieve download URL via file_id and save the video."""
resp = requests.get(
f"{API_BASE}/files/retrieve",
headers=_headers(),
params={"file_id": file_id},
timeout=30,
)
resp.raise_for_status()
data = resp.json()
_check_resp(data)
download_url = data.get("file", {}).get("download_url", "")
if not download_url:
raise SystemExit(f"No download_url in response: {json.dumps(data, indent=2)}")
View on GitHub (pinned to 60aaae52bb)
Solutions
- Re-run with --max-wait 1200 (or pass max_wait=1200).
- Manually query the task_id later via GET /query/video_generation?task_id=... and then download_video() once Success.
- Lower resolution to 768P/720P or duration to 6s to speed processing.
- Persist the task_id so a timed-out run can be resumed without re-submitting.
Example fix
# before file_id = poll_task(task_id) # default max_wait=600 -> Timeout # after file_id = poll_task(task_id, max_wait=1800, interval=15)
Defensive patterns
Strategy: retry
Validate before calling
# choose max_wait based on expected job cost
max_wait = 600 if resolution in ('720P','768P') and duration == 6 else 1200
# or compute from CLI: --max-wait Try / catch
try:
file_id = poll_task(task_id, max_wait=600)
except SystemExit as e:
if 'Timeout' in str(e):
# resume later instead of re-submitting
file_id = resume_poll(task_id)
else:
raise Prevention
- Scale max_wait with resolution/duration (1080P + 10s needs the most time).
- Persist task_id on disk so timed-out jobs can be resumed.
- Avoid re-submitting on timeout — the original task may still finish.
When it happens
Trigger: Video generation takes longer than max_wait — queue backlog, high resolution (1080P), long duration (10s), or peak-hour congestion inflate processing time beyond the default 600s.
Common situations: Default 600s too short for 1080P/10s jobs; server-side queue slow at peak hours; network latency inflating each poll round.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Timeout after {max_wait}s. task_id={task_id}, check manually
- Task succeeded but no file_id returned
- Generation incomplete (status={status}): {json.dumps(data, i
- API Error [{code}]: {msg}
- No task_id in response: {json.dumps(data, indent=2)}
AI-assisted analysis of MiniMax-AI/skills@60aaae52bb (2026-08-13).
Data as JSON: /api/errors/476b0de63b213928.
Report an issue: GitHub.