Cloudflare Developers

CD

Cloudflare Developers

Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news

Join

Workers wall clock timeout (524) at 10 seconds

According to the docs workers don't have duration limits (docs) but I'm getting 524s every time wall clock exceeds 100 seconds. Are the docs wrong or am I doing something wrong? EDIT 100 seconds not 10

Getting JavaScript heap out of memory on build

Suddenly getting Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory but I don't know what is causing the issue.

Long Running Cloudflare Containers Processes

Wondering if anyone has some guidance they can share - we have an AI process that runs in a container and takes about 15-20 minutes per invocation. This is triggered by an R2 event subscription where the consumer worker calls my Cloudflare Container app. Right now the issue is the proxy worker that forwards the request to the container is timing out at 180,000 ms (3 minutes) and causing the process to be retried. The actual process works within the deployed container, but we don't want it to be...

Seeing periodic "Workers runtime canceled this request" errors across multiple endpoints

In the past week or so we've started seeing a number of these errors:
The Workers runtime canceled this request because it detected that your Worker's code had hung and would never generate a response. Refer to: https://developers.cloudflare.com/workers/observability/errors/
The Workers runtime canceled this request because it detected that your Worker's code had hung and would never generate a response. Refer to: https://developers.cloudflare.com/workers/observability/errors/
...

Worker is served from LHR even though I'm in YYZ

For my worker domain dev.openpromo.app/cdn-cgi/trace consistently shows colo=LHR, even though I'm located in Toronto. By contrast, cdn-cgi/trace for cloudflare.com shows colo=YYZ. I checked the DNS records and it shows proxied. And I tried turning on and off smart placement it also didn't make a difference....

Workers sometimes crashes when building NextJS

Sometimes this happens and it works after I hit rerun. Am I doing something wrong?
No description

D1 read replication issues

I recently gave D1 global replication a try, and here are some findings/issues: 1. Only 1 replica was created in EEUR with the primary in APAC (I live in India). 2. The first request after a cold start is always routed to the primary - even when the replica is significantly faster. This pattern keeps repeating. 3. Bookmarks change unintentionally sometimes (without a write query). Maybe Cloudflare automatically adds a bookmark after a while, but I couldn't find any related docs. ...

Fetching R2 Worker gives fetch failed

Using NextJS (open next) running in localhost, I'm calling an API endpoint from my client frontend. Testing locally and I will sporadically get 'fetch failed'. Has anyone experienced this? Seems like the request is never escaping my machine, I don't see logs in my R2 worker or get response codes back or anything.

Error: 403 Country, region, or territory not supported.

Hello, we are currently using Cloudflare Workers on the Business plan. When our Workers make requests to OpenAI, we occasionally receive the response: “Error: 403 Country, region, or territory not supported.” It appears this happens when a Worker executes in the Hong Kong region. Is there a way to prevent Cloudflare Workers from running in the Hong Kong region?

Worker Builds w/ PNPM failing `postinstall` for esbuild, workerd, @parcel/watcher, and sharp

Off the bat—sharp is only used in a script during build; it's never imported from worker code. Having an issue where Worker Builds is failing most of the postinstall scripts in my project's dependencies. The specific failures are for: - esbuild (JS script; appears to ensure the correct binary is installed), which is depended on by drizzle-kit - workerd (nearly identical script to esbuild), which is depended on by wrangler (via its dependency on miniflare)...

R2 and CDN

I’m using Cloudflare R2 to store and stream videos and images. I’d like to know how many concurrent users can watch the videos, and which plan would be most suitable for this use case? The videos are stored in multiple formats (360p, 480p, 720p, and 1080p) and are streamed adaptively based on the user’s network connectivity. Do I need to purchase the workers KV or any other plans for it?...

How to split big worker into smaller ones to minimize startup time?

Hi all! we've hit a limit recently "- Error: Script startup exceeded CPU time limit. [code: 10021]" when trying to deploy our API worker. https://github.com/AsyncStatus/asyncstatus/tree/main/apps/api. Deploy and commit that introduced this issue https://github.com/AsyncStatus/asyncstatus/actions/runs/17192217490...
No description

Migrated Pages to Workers. Error 522 - Connection timed out.

I have migrated from Pages to Workers and changed (deleted and created new one) root DNS CNAME record to <my-worker>.<my-domain>.workers.dev, but now my website is down with error "Connection timed out. Error code 522". DNS record change should take up to 5 minutes, but few hours have passed already and it is still the same....

AI Gateway OpenAI Realtime Connection Error

Hello. When I'm trying to connect in realtime to OpenAI Realtime with AIGateway (for metrics, costs, etc...), it gives me an error, the following example is running on node so I can make sure the limitations of the cloudflare worker doesn't interfere with the demostration: ```...

Using workers for SSO

Hey guys, while i know this is part of the full zero trust platform. But in theory cant this implement as a standalong feature? Protect the people from published service by (semilar to the js challenge) users have to pass an SSO'd login portal first before reaching the published site....

IDE not picking up $schema in wrangler.jsonc

Hey all I'm pretty new to wrangler, I'm trying to setup autocomplete in the wrangler.jsonc config but my IDE doesnt seem to pick up the schema: ```json { "$schema": "node_modules/wrangler/config-schema.json", // warning...

Worker losing Secret from env

I have a number of secrets defined for my worker, for some reason and without action on my part the worker seems to lose them from it's ENV despite them showing as existing in the dashboard. I have to rotate the key and deploy to get it to access again and then seemingly once a day any one of them is lost. Has anyone else experienced this? If so, how did you solve it?...

Sveltekit now has observability - Would this work with Cloudflare's observability?

I saw this announcement
SvelteKit now has built-in support for OpenTelemetry since v2.29.0. Observability docs; blog post. Special thanks to @Nyx (tcc-sejohnson) and @Lukas Stracke for their efforts!
How could it sync/work with cloudflare's observability?...

How to deploy containers like cloud run?

I trying to deploy my backend on containers but I do not want to use durable objects. I wanna access my backend using http requests. How can I do that? Is it possible?...

Cannot upgrade to paid Worker AI

Hi, I need to upgrade to the paid plan, and my app that I use the workes for are on the news - so it got a high level of usage now all of a sudden. However, I can't upgrade. I tried changing my card, paypal, removing cache, changing web browser, still doesnt work: "Internal Server Error" and "There was an error enabling your workers". Please help ASAP!...