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

Do workers have deploy hooks?

I would like to configure external cron to rebuild several times a day. Right now I am using a Github workflow to update an empty file at the root of the project to trigger a build. But it gets tiresome since I have to rebase every time before I commit.

Cannot destructure property 'Agent' of 'workerdHttp' as it is undefined.

I'm trying to migrate from next-on-pages to opennextjs, and I'm getting this error when trying to preview the site but can't figure out what's actually causing it. Has anyone seen anything similar? Where should I be looking to debug? The stacktrace just shows a giant line of autogenerated code which isn't particularly helpful...
No description

Can't access env vars in Workers build

I'm migrating some Astro projects, that build static pages, from Cloudflare Pages to Cloudflare Workers. I'm following the migration tutotial and looking the docs. But I 'cant access the environment variables defined in wrangler.toml in process.env during or after the build. I using the compat flags: compatibility_flags = [ "nodejs_compat", "nodejs_compat_populate_process_env" ] But in any moment i'm seeing the variables in log Is there anything else i need to do?...

Workers cache overhead?

Hi, I am trying to figure out the best way to optimize response times for cached resources served from a worker. With worker + cache API, I am getting response times of about 200ms pretty consistently for an image. The same image, when served from cloudfront, is about 50-70ms. Both responses appear to be coming from IAD. Is the extra 150ms a result of worker overhead? Is there any way to improve this? (My application is an interactive medical imaging viewer, so load times are really important)

How to have multiple external custom hostnames within the same zone name for my different Workers?

I have generally speaking small clients, and (in the future) many of them. Because of that, I need to be able to have external domain names pointing to my few different workers (i.e. a client has a domain on Gandhi/OVH/etc and points it towards my app) without having to necessarily transfer the domain to Cloudflare. After some help on https://discord.com/channels/595317990191398933/812577823599755274/1405542977069121728: * created the fallback origin (proxy.reeple.studio) * added the custom hostname from my client (thorgal.caracal.agency)...

Workers CPU Limits

We’re currently dealing with some issues around cpu time limits for workers. We have a system setup with Workers for Platforms such that someone could upload a function and then schedule it to be invoked. It is our invoker that seems to be hitting cpu limits in some cases and we’re looking to get answer to the question of whether the Workers for Platforms workers would have their own cpu limit or whether that compute would count towards the limit of the invoker.

All of my requests are failing when smart placement is turned on with dev server.

Hi, I'm trying out smart placement for worker with dev deployment which serves 0 to minimum traffic. I know that smart placement has analysis process that may take up to 15 minutes, however worker request failing by 100% is something odd if I understood correctly. Is this normal for Dev servers with less traffic? Will it work if I just blindly switch smart placement on for Prod servers? (I'm afraid not) Looking for a help / insight to mitigate this request failures!...

Getting Authentication error [code: 10000] on deploy from wrangler

Hi, since yesterday I am getting a very annoying error. I have a opennextjs worker and I deploy pretty frequently to test, since I don't use the local development and preview. On running yarn wrangler deploy the second step in the script (opennextjs-cloudflare deploy) fails: ```bash Successfully populated cache with 10 assets Creating D1 table if necessary......

Is there a way to view durable objects built in SQL or agent schedule?

I can't see any of the current rows or schedules/crons that are being executed by my agent. Nor can I see the tables for my durable object.

Need help running queue jobs in worker concurrently

Hey there i’ve got a background job that i run for every user, and each job takes at least ~90 seconds wall time. what i want is to run them for all users concurrently, not sequentially. so right now, for testing, i’m adding one queue message per user (say 10 users). i set max_batch_size = 1 and max_concurrency = 50 on the queue. i was expecting cloudflare to spin up multiple consumer workers so jobs don’t block each other....

Cloudflare blocking traffic to my Worker because of non-existent "Rate limiting rules"

I'm seeing some legitimate IPs being blocked by cloudflare and I can't prevent that from happening. Security > Analytics > Events show me many blocked events with this payload or similar: ``` { "action": "block",...
No description

Cannot open index.html with mailto: or discord: redirect. Why?

I apologise for entering all the information in the incorrect section. Here is the problem description. I would really appreciate some advice or enlightenment. Any help would be much appreciated. https://discord.com/channels/595317990191398933/1405232246398517248...

What's the recommended way to interact with cache from Workers?

Hi team, I’m trying to clarify the best practice for handling cache from Workers, and I’ve noticed two different approaches in the docs: 1. Set config & let Cloudflare handle it — for example, using Cache Using Fetch, where you configure and pass the request through with fetch(). 2. Interact directly with the Cache API — for example, using Cache API , where the Worker itself retrieves or stores content explicitly....

MongoDB errors

I wanted to update my worker removing the old deprecated MongoDB Atlas API, and I read that now Workers should support the MongoDB node.js driver, but I can't seam to make it work. Everything is working fine on my local machine, I set the compatibility flags to nodejs_compat and compatibility date to 2025-05-05, but when I publish the worker I keep getting errors like: ```diff...

Debug worker in a turborepo monorepo, Cursor/VSCode

I'm using cloudflare workers in my turborepo monorepo in cursor. Whatever I try with this setup, I can't seem to get the debugger to stop on my breakpoints. Any idea what I can do to be able to debug properly?

Long wall times and short response times

Hey folks, we're seeing a worker with long wall times but very short response times. We're not using context.wailtUntil anywhere, and this is a fairly simple request flow through Hono (which we've now logged the living daylights out of, including in Hono itself). We have a couple of Supabase REST API calls that complete quickly, and we seem to get to the point where we're returning the response within 200-500ms, but we end up with a CPU time of maybe 10-20ms and a wall time of 30s. The worker then gets cancelled, but appears to have correctly returned a response—all very mysterious. Finally, I've tried to hit everything with the dangling promise lint rules in @typescript-eslint and biome, but nothing pops out. With all that said, I'm wondering if anyone knows what might be good to look out for to understand where the wall time is being spent—how do others go about debugging these scenarios?...

Counting Workers requests: difference between charts

On the dashboard, the Workers and Pages page tells me my workers have handled 501K requests this month. But the Billable Usage chart on the Billing page says 4M(!) requests over roughly the same time period. What could explain the difference? 4M can't be right - it's not consistent with database metrics, analytics, etc....
No description

Wrangler deployment error - Custom Instance

I'm getting the error
Error rolling out application project-container due to an internal error (request id: undefined): VALIDATE_INPUT
Error rolling out application project-container due to an internal error (request id: undefined): VALIDATE_INPUT
when attempting to deploy with wrangler. My wrangler.jsonc consists of: ``` "instance_type": { "vcpu": 2,...

Unable to cache static pages in ssg using opennext

``` // SSG configuration - optimized for static coin pages import { defineCloudflareConfig } from "@opennextjs/cloudflare"; import staticAssetsIncrementalCache from "@opennextjs/cloudflare/overrides/incremental-cache/static-assets-incremental-cache"; ...