Website Errors

How to Fix Cloudflare Error 1019 (Compute Server Error)

Error 1019Plain English: the site's Cloudflare Worker is calling itself in a loop — each request triggers the same Worker again — so Cloudflare stops the loop and shows this error page instead of the website.
Quick answer: Error 1019 is a compute server error caused by a Cloudflare Worker that recursively references itself. The fix belongs to the site owner: find the fetch call that points back at the Worker's own route, break the loop by fetching the origin directly or adding a guard that stops the second pass, redeploy the Worker, and purge the Cloudflare cache if a cached error page lingers. Visitors cannot fix it themselves; contact the owner and try again later. The full steps are below.

What Error 1019 means

Cloudflare's 1xxx error family covers DNS, proxy, and compute configuration problems, and Error 1019 is the compute entry in that family. Cloudflare's own documentation describes it in one line: a compute server error related to a Cloudflare Worker, whose common cause is a Worker script that recursively references itself. The page carries HTTP status 503, which is why the site looks completely down rather than partly broken — no version of the page can load while the loop is in place.

Picture the loop in slow motion. A visitor requests a page, Cloudflare routes the request to the Worker, and the Worker code fetches a URL in order to build its response. If that URL is one the Worker itself handles, Cloudflare routes the fetch right back to the same Worker, which fetches the same URL again, and again. Cloudflare detects the recursion and serves Error 1019 instead of letting the loop run forever. Nothing about your computer, browser, or internet connection causes this, and nothing on the visitor's side can resolve it. Only someone who can edit and redeploy the Worker can break the cycle. It is also worth distinguishing 1019 from its close relatives: Error 1101 means a Worker threw a JavaScript exception, Error 1102 means a Worker exceeded its CPU or memory limit, and Error 1014 means a CNAME points across Cloudflare accounts — none of those is a self-calling loop.

Common causes

How to fix Error 1019 — step by step

Steps 1 through 5 are for the developer or site owner. Step 6 is for visitors.

  1. Recognize that Error 1019 is a Worker recursion problem. Recognize that Error 1019 is a Worker recursion problem, not a visitor problem. Cloudflare serves Error 1019, a compute server error with HTTP status 503, when a Worker script recursively references itself. No browser setting, cache clear, or device change can fix it, because the loop lives in the Worker's own code. Visitors should skip to step 6; the middle steps are for the developer or site owner who controls the Worker.
  2. Open the Worker and check its logs for repeated requests. Open the Worker and check its logs for repeated requests. In the Cloudflare dashboard, go to Workers and Pages, select the Worker that serves the broken route, then open Logs. Look for the same request path appearing over and over in a tight burst, or a single request that spawns many subrequests before failing. That repeating pattern is the fingerprint of a recursive loop, and the path that repeats tells you which route is calling itself.
  3. Find the fetch call that points back at the Worker's own route. Find the fetch call that points back at the Worker's own route. Search the Worker source for fetch calls, and check each one against the Worker's own hostname and route pattern. The culprit is usually a fetch to the same hostname the Worker is attached to, a fetch to a relative path that resolves through the Worker again, or a redirect that sends the request back to a URL the Worker handles. Also check any middleware, helper function, or chained Worker that the request passes through, because the loop can hide one hop away from the main handler.
  4. Break the loop by fetching the origin directly or guarding the request. Break the loop by fetching the origin directly or guarding the request. The cleanest fix is to point the fetch at the origin server itself, such as the origin hostname or IP that sits behind Cloudflare, instead of at the public hostname that routes through the Worker. If the Worker must call a Cloudflare-fronted URL, add a guard: send a custom header or query marker on the internal fetch and return early, or serve the origin response directly, when that marker is present, so the second pass never fetches again. Never let a Worker fetch a URL that its own route pattern will catch a second time.
  5. Redeploy the Worker and verify the site loads again. Redeploy the Worker and verify the site loads again. Deploy from the dashboard, or from your terminal with npx wrangler deploy, then request the broken URL in a fresh browser tab and watch the Worker logs for a single clean request instead of a burst. If the page still shows Error 1019, purge the cache in the Cloudflare dashboard under Caching, then Configuration, then Purge Everything, because a cached copy of the error page can keep showing after the code is fixed. Repeat the log check until one request produces one fetch, not a chain.
  6. Visitor: report it to the owner and retry later. Visitor: report it to the owner and retry later. As a visitor you cannot fix Error 1019, because the recursive Worker belongs to the site owner. Reload the page once to rule out a cached error, then reach the owner through their other channels: social media accounts, a contact email, or their support system. Tell them you are seeing Cloudflare Error 1019, a compute server error caused by a Worker calling itself, which tells them exactly where to look. Try the site again after a few hours; once the owner breaks the loop and redeploys, the site loads normally.

Did this fix it? Quick checklist

If you are the owner and the error persists after the obvious fetch looks fixed, search the whole Worker project, not just the main handler — shared helpers, middleware, and chained Workers are the usual hiding places for a second fetch. Also check the route pattern itself: a broad pattern such as a catch-all route will swallow fetches you expected to bypass the Worker, so narrow the pattern or move the internal endpoint outside it. And if the Worker was recently deployed from a new branch or a new team member's change, compare that deploy with the last working one; a single changed fetch target is often the whole story, and rolling back to the last good deploy while you investigate is a legitimate short-term fix.

Frequently asked questions

What does Cloudflare Error 1019 mean?

Error 1019 means a compute server error caused by a Cloudflare Worker that recursively references itself. In plain terms, the Worker makes a request that comes back to the same Worker, which makes the same request again, and so on, until Cloudflare stops the loop and serves the Error 1019 page with HTTP status 503. It is a code problem in the site's Worker, not a problem with your browser or connection.

Why does Error 1019 happen?

It happens when a Worker fetches a URL that its own route pattern handles. The classic case is a Worker attached to a hostname that fetches that same hostname, but it can also come from a relative fetch that resolves through the Worker again, a redirect that bounces the request back to a Worker-handled route, or two Workers that call each other in a circle. Any path where a request can re-enter the same Worker without an exit condition will eventually trigger Error 1019.

Can I fix Error 1019 as a visitor?

No. The recursive Worker belongs to the site owner, and only someone who can edit and redeploy that Worker can break the loop. Clearing your browser cache, switching networks, or trying another device will not help, because every fresh request hits the same loop. The right move is to reload once, then contact the site owner, mention Cloudflare Error 1019, and try again later.

How do I find the recursive call in my Worker?

Open Logs for the Worker in the Cloudflare dashboard under Workers and Pages, then request the broken URL and watch for the same path repeating in a burst. Then search the Worker source for every fetch call and compare each target against the Worker's own hostname and route pattern. The fetch whose target would route back through the Worker is the recursive call. Pay special attention to relative fetches, helper functions, and middleware, because the loop often sits one hop away from the main handler.

How is Error 1019 different from Error 1101 and Error 1102?

All three are Worker errors, but they point at different faults. Error 1019 means the Worker calls itself in a loop. Error 1101 means the Worker threw a JavaScript exception while running, such as a coding error or a failed subrequest. Error 1102 means the Worker exceeded its CPU or memory limit. If your Worker crashes, look at 1101; if it runs too long or uses too much memory, look at 1102; if the logs show the same request repeating, it is 1019.