nexu-io/open-design · error · Error

Vela video task timed out after ${totalTimeoutMs}ms; last st

Error message

Vela video task timed out after ${totalTimeoutMs}ms; last status ${lastStatus}

What it means

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).

Source

Thrown at apps/daemon/src/media/vela.ts:513

      input.onProgress?.(`Vela video status ${lastStatus}; elapsed ${elapsedSeconds}s`);

      if (lastStatus === 'succeeded') {
        const bytes = await readNonEmptyOutput(outputPath, 'video get');
        return {
          bytes,
          providerNote: `vela/${wireModel} · ${ratio} · ${input.length ?? 5}s · ${DEFAULT_VELA_VIDEO_RESOLUTION} default · ${bytes.length} bytes`,
          suggestedExt: '.mp4',
        };
      }
      if (lastStatus === 'failed' || lastStatus === 'cancelled' || lastStatus === 'canceled') {
        throw new Error(`Vela video task ended with status ${lastStatus}: ${videoTaskError(task)}`);
      }
      if (lastStatus !== 'queued' && lastStatus !== 'running') {
        throw new Error(`Vela video task returned unsupported status ${lastStatus}`);
      }
    }

    throw new Error(
      `Vela video task timed out after ${totalTimeoutMs}ms; last status ${lastStatus}`,
    );
  } finally {
    await rm(tempDir, { recursive: true, force: true });
  }
}

View on GitHub (pinned to 5be4028344)

Solutions

  1. Increase OD_VELA_VIDEO_TIMEOUT_MS in the daemon environment to allow more time
  2. Check Vela backend status for queue congestion or outages
  3. Reduce OD_VELA_VIDEO_POLL_INTERVAL_MS for more responsive status detection
  4. Retry the request when backend load is lower
Defensive patterns

Strategy: retry

Try / catch

const MAX_RETRIES = 2;
let lastErr;
for (let attempt = 0; attempt <= MAX_RETRIES; attempt++) {
  try {
    return await renderVelaVideo(input);
  } catch (err) {
    lastErr = err;
    if (err.message.includes('timed out') && attempt < MAX_RETRIES) {
      await sleep(5000 * (attempt + 1));
      continue;
    }
    throw err;
  }
}
throw lastErr;

Prevention

When it happens

Trigger: 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.

Common situations: Backend queue congestion during peak hours; large/complex video generation jobs; tight timeout in test/CI environments; network latency inflating each poll round-trip.

Understand the failure class

Related errors


AI-assisted analysis of nexu-io/open-design@5be4028344 (2026-08-12). Data as JSON: /api/errors/27cf919c150b5799. Report an issue: GitHub.