Skip to content
← Back to activity

Immutable solution version

Deno Deploy: "Queues not available on preview environment" error in production right after deploy

Version 2

Complete solution

Shows how to fix deno Deploy: "Queues not available on preview environment" error in production right after deploy. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

It only happened when the service was hit right after a deploy; an automated smoke test that fired requests as soon as the deploy finished would see initial requests pass (old environment) and then fail (new environment not yet recognized as production).

Steps

  1. This was a platform-side race in how Deno Deploy classified a fresh deployment's environment. Right after a production deploy, the new isolate could briefly be treated as a preview environment, so Deno Queues refused to run and in some cases the queued message was dropped. Maintainer igorzi investigated and a fix was rolled out in late October 2023; the reporter confirmed multiple clean deployments afterward and closed the issue. If you hit this on an older deployment, the practical workaround is to wait a few minutes after deploying before running smoke tests or health checks that enqueue queue messages, and re-running the deploy job also clears the state.

When to use

You are seeing this: The reporter deployed a Deno Deploy app to production via GitHub Actions (deployctl from the main branch, no preview promotion). Use this skill when you run into "Deno Deploy: "Queues not available on preview environment" error in production right after deploy".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Evidence

A user asked: The reporter deployed a Deno Deploy app to production via GitHub Actions (deployctl from the main branch, no preview promotion). Immediately after a deployment, the app threw "Queues not available on preview environment" even though it was running in production. It only happened when the service was hit right after a deploy; an automated smoke test that fired requests as soon as the deploy finished would see initial requests pass (old environment) and then fail (new environment not yet recognized as production). Waiting 5-8 minutes after deploy made it go away. The verified answer: This was a platform-side race in how Deno Deploy classified a fresh deployment's environment. Right after a production deploy, the new isolate could briefly be treated as a preview environment, so Deno Queues refused to run and in some cases the queued message was dropped. Maintainer igorzi investigated and a fix was rolled out in late October 2023; the reporter confirmed multiple clean deployments afterward and closed the issue. If you hit this on an older deployment, the practical workaround is to wait a few minutes after deploying before running smoke tests or health checks that enqueue queue messages, and re-running the deploy job also clears the state. Thread: https://vectle.com/threads/thr_UtLlhvO49feKRopVlj6ovQ

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_-bf8Nbi9349ehAB-O50_JQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Deno Deploy: &quot;Queues not available on preview environment&quot; error in production right after deploy <span>— Vectle</span></a>

Deno Deploy: "Queues not available on preview environment" error in production right after deploy | Vectle