decolua/9router · error

Deploy timed out after 60 seconds

Error message

Deploy timed out after 60 seconds

What it means

After creating a Deno Deploy revision, the route polls its status every 2 seconds, at most 30 attempts (60s). If the revision is still 'queued' or 'building' after that window, the deploy is abandoned with this timeout error rather than blocking the request indefinitely.

Source

Thrown at src/app/api/proxy-pools/deno-deploy/route.js:134

      await fetch(`${DENO_V2_API}/apps/${app.id}`, {
        method: "DELETE",
        headers: { Authorization: `Bearer ${denoToken}` },
      }).catch(() => {});
      return NextResponse.json(
        { error: `Deploy failed (${deployRes.status}): ${text}` },
        { status: deployRes.status }
      );
    }

    const revision = await deployRes.json();
    const revisionId = revision.id;

    let status = revision.status;
    let attempts = 0;
    const maxAttempts = 30; // 30 * 2s = 60s max
    while (status === "queued" || status === "building") {
      if (attempts >= maxAttempts) {
        throw new Error("Deploy timed out after 60 seconds");
      }
      await new Promise((resolve) => setTimeout(resolve, 2000));
      const statusRes = await fetch(`${DENO_V2_API}/revisions/${revisionId}`, {
        headers: { Authorization: `Bearer ${denoToken}` },
      });
      if (!statusRes.ok) break;
      const statusData = await statusRes.json();
      status = statusData.status;
      attempts++;
    }

    if (status !== "succeeded") {
      await fetch(`${DENO_V2_API}/apps/${app.id}`, {
        method: "DELETE",
        headers: { Authorization: `Bearer ${denoToken}` },
      }).catch(() => {});
      return NextResponse.json(
        { error: `Deploy failed with status: ${status}` },

View on GitHub (pinned to 90b52e06ff)

Solutions

  1. Retry the deploy — transient queue congestion often resolves.
  2. Check the revision on dash.deno.com for build logs/errors if it consistently stalls.
  3. Shrink the deployed project (fewer/simpler files) so the build completes within 60s.
  4. If timeouts are frequent, check Deno Deploy status page for ongoing incidents and consider raising maxAttempts in the route.

Example fix

// before
const maxAttempts = 30; // 60s max
// after
const maxAttempts = 90; // tolerate slower builds (180s)
Defensive patterns

Strategy: retry

Try / catch

try {
  await deployToDeno(config);
} catch (e) {
  if (e.message.includes("Deploy timed out")) {
    console.warn("Build exceeded 60s — retrying deploy");
    await deployToDeno(config); // queue congestion often clears
  } else throw e;
}

Prevention

When it happens

Trigger: POST to /api/proxy-pools/deno-deploy where the Deno Deploy build takes longer than 60 seconds (large project, cold build queue, slow assets), leaving status stuck at queued/building for 30 polls.

Common situations: Deno Deploy platform congestion or incident causing long build queues; an unusually large deployment; a revision that silently stalls in 'building' due to a build error that never flips the status.

Understand the failure class

Related errors


AI-assisted analysis of decolua/9router@90b52e06ff (2026-08-30). Data as JSON: /api/errors/c6db9e37b5fd1c81. Report an issue: GitHub.