{"record":{"id":"27cf919c150b5799","repo":"nexu-io/open-design","slug":"vela-video-task-timed-out-after-totaltimeoutms-m","errorCode":null,"errorMessage":"Vela video task timed out after ${totalTimeoutMs}ms; last status ${lastStatus}","messagePattern":"Vela video task timed out after (.+?)ms; last status (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"apps/daemon/src/media/vela.ts","lineNumber":513,"sourceCode":"      input.onProgress?.(`Vela video status ${lastStatus}; elapsed ${elapsedSeconds}s`);\n\n      if (lastStatus === 'succeeded') {\n        const bytes = await readNonEmptyOutput(outputPath, 'video get');\n        return {\n          bytes,\n          providerNote: `vela/${wireModel} · ${ratio} · ${input.length ?? 5}s · ${DEFAULT_VELA_VIDEO_RESOLUTION} default · ${bytes.length} bytes`,\n          suggestedExt: '.mp4',\n        };\n      }\n      if (lastStatus === 'failed' || lastStatus === 'cancelled' || lastStatus === 'canceled') {\n        throw new Error(`Vela video task ended with status ${lastStatus}: ${videoTaskError(task)}`);\n      }\n      if (lastStatus !== 'queued' && lastStatus !== 'running') {\n        throw new Error(`Vela video task returned unsupported status ${lastStatus}`);\n      }\n    }\n\n    throw new Error(\n      `Vela video task timed out after ${totalTimeoutMs}ms; last status ${lastStatus}`,\n    );\n  } finally {\n    await rm(tempDir, { recursive: true, force: true });\n  }\n}\n","sourceCodeStart":495,"sourceCodeEnd":520,"githubUrl":"https://github.com/nexu-io/open-design/blob/5be4028344c2eb4c667c5a97bda8f750c5597ef7/apps/daemon/src/media/vela.ts#L495-L520","documentation":"The video task did not reach a terminal state (succeeded/failed/cancelled) within the configured totalTimeoutMs. The loop exits after the deadline with the last known status. The timeout is configurable via OD_VELA_VIDEO_TIMEOUT_MS; poll interval via OD_VELA_VIDEO_POLL_INTERVAL_MS (default 5000ms).","triggerScenarios":"The task stays in 'queued' or 'running' longer than totalTimeoutMs; the Vela backend is overloaded and tasks take longer than expected; the poll interval is large relative to the timeout so few polls occur before the deadline.","commonSituations":"Backend queue congestion during peak hours; large/complex video generation jobs; tight timeout in test/CI environments; network latency inflating each poll round-trip.","solutions":["Increase OD_VELA_VIDEO_TIMEOUT_MS in the daemon environment to allow more time","Check Vela backend status for queue congestion or outages","Reduce OD_VELA_VIDEO_POLL_INTERVAL_MS for more responsive status detection","Retry the request when backend load is lower"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"const MAX_RETRIES = 2;\nlet lastErr;\nfor (let attempt = 0; attempt <= MAX_RETRIES; attempt++) {\n  try {\n    return await renderVelaVideo(input);\n  } catch (err) {\n    lastErr = err;\n    if (err.message.includes('timed out') && attempt < MAX_RETRIES) {\n      await sleep(5000 * (attempt + 1));\n      continue;\n    }\n    throw err;\n  }\n}\nthrow lastErr;","preventionTips":["Set OD_VELA_VIDEO_TIMEOUT_MS generously enough for backend processing under load","Monitor Vela backend status pages for queue congestion before batch operations","For CI/test environments, use shorter timeouts with mock responses instead of real generation"],"tags":["vela","video","timeout","polling"],"backgroundTag":null,"analyzedSha":"5be4028344c2eb4c667c5a97bda8f750c5597ef7","analyzedAt":"2026-08-12T12:03:58.812Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}