© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•7mo ago•
1 reply
AliAkbar

Cloudflare Worker Issue: 522 Timeout on ALL Outbound Requests

Setup: I'm building a SaaS proxy where customers get custom domains that route to specific paths on my DigitalOcean app. Using Cloudflare Worker as reverse proxy.
The Flow:
User visits chattest.mori.style
Cloudflare Worker looks up path prefix from KV store
Worker should fetch from service-frontend-qaarf.ondigitalocean.app/assistant/[uuid]/
Return the content to user
The Problem: Getting 522 timeout errors. Worker executes but fetch() to origin fails.
Debugging Journey:
✅ DNS resolution works
✅ SSL certificate active
✅ Worker triggers correctly
✅ KV lookup successful
✅ Origin server responds to direct curl (200 OK)
❌ Worker's fetch() to origin times out
The Plot Twist: Even simplified worker that just fetches google.com gives 522 timeout! This proves it's not my DigitalOcean app - it's the Worker's outbound networking.
Current Status: Worker can't make ANY external requests, even to Google. This suggests a platform-level issue with my Worker's networking.
My question is, What can cause this?


Code: Simple test case that fails:
addEventListener("fetch", event => {
  event.respondWith(fetch("https://www.google.com/"));
});
addEventListener("fetch", event => {
  event.respondWith(fetch("https://www.google.com/"));
});

Help appreciated! 🤔
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Worker isn't triggering on all requests
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
2y ago
Cloudflare worker context persists between requests?
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
3y ago
Worker timeout
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
11mo ago