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

Recorded CPU time much higher with hyperdrive

When using a bare hono "hello world" project, the worker logs says its takes 0ms CPU time. When i add a hyperdrive that queries "select 1;" the CPU time is increased to 9ms. I read on some pages that a worker should only take up 1-2ms and doesn't take external resources in account so i am a bit confused why it's so high. Switching to drizzle-orm didn't change the CPU time....

Direct access to worker endpoints from the browser

How do i access the worker endpoints directly from the browser when using the vite plugin? Setting the following doesn't solve it ```jsonc "run_worker_first": [ "/api/*", ...

Workers routes wildcard subdomain affects other subdomains

Typically with dns the most specific entry resolves first. ie www.example.com resolves before .example.com but this doesn't seem to be how workers routes works. I want a a specific route like `.example.com/*` to point to a specific worker but I want my existing dns records to resolve correctly. How can this be achieved?...

Worker routes not showing on DNS records - CF Bug?

I have a worker with routes configured via wrangler.jsonc but I am not seeing any DNS records to domain. I have other workers that show, but this one doesn't. Even if I remove route in CF GUI and readd I am still not seeing any DNS records add. ```json "routes": [ { "pattern": "pricefox.uk",...
No description

LLM API calls failing due to geo restrictions

We're looking into using Cloudflare Workers, but both standard and "smart" placement sometimes result in the worker being in a country that the LLM providers (OpenAI, Anthropic, Gemini) don't serve, so we get the below errors. I found some community forum threads about this, but no one seems to have a reliable solution. Is there really no way to reliably make direct calls to LLM providers from a Cloudflare Worker?...

Backpressure handling in Websocket Worker

Folks, I am looking to port an existing ws project to edge using workers and I couldn't find anything on how CF worker will handle backpressure in case of a slow client? I don't see any way to throttle the messages I send from server. Any idea on how internally Workers handle that?

Inspecting Durable Objects SQLite Databases

Is there a way to get somewhat convenient access to the sqlite databases of durable objects? I haven't really found anything other than building my own API to access them

Question about networking

Hey everyone, I have a question about networking I have some experience but I can't seem to find a resolution to my issue here. I have 2 applications running on 443 on my router but can only port forward 1 port at a time, I've tried changing the external port to one application to 8443:443 and this now works with my cloudflared domain but i have to do https://mydomain.tld8443 now, Is there any way to get around this? Tunnel is not an option here as it is a mail application and it would break the mailing records if i did. ...

Assets Subfolders returning 404s

I am trying to use the cloudflare vite plugin and for some reason, assets cannot be fetched from any sort of subfolder from dist causing issues. So for e.x robots.txt returns fine, but assets/XYZ.js is returning 404s...

Local wrangler deploy fails, error 10013

Hi there, Running wrangler deploy (using latest wrangler 4.22.0) and running into the following: ```...

Deploy issue just started this morning

I've been deploying a lot of code and changes to my worker over the past week and this morning I started getting this error: ``` ✘ [ERROR] A request to the Cloudflare API (/accounts/***/queues/b33dc908617d4035816092620f064ee2) failed. 09:55:54.681
09:55:54.682 An unknown error has occurred. If this error persists, please file a report in workers-sdk (https://github.com/cloudflare/workers-sdk/issues) or reach out to your account team. [code: 10013]...

Sentry "A hanging Promise was canceled"

I have a worker with custom SWR implementation that leverages waitUntil. The general app logic works fine and has been in production for a while. Now I wrapped the fetch with Sentry.withSentry. ...

How do Image Transformations work?

I see https://developers.cloudflare.com/images/transform-images/transform-via-url/ and replaced the src in the img by prepending /cdn-cgi/image/quality=75/original.jpeg but it just always complains that it's not found. I'm running this on a local SvelteKit app.

Durable Objects error

I have a route on my Worker that allows me to flush and re-obtain information from a 3rd-party API. However, recently, when I invoke that route, I get this error: {"error":"Durable Object storage operation exceeded timeout which caused object to be reset."}...

How do I fetch origin after enabling `global_fetch_strictly_public`

I would like to fetch origin after enabling the global_fetch_strictly_public flag. For example, for all fetch() call use the public behaviour but when the request is from trusted source, it can fetch the origin....

SSL for custom domain pointing to workers.dev

I deployed a Workers project and get the *.workers.dev default domain and it works fine. I add a subdomain on a custom domain registered in my Cloudflare account and when accessing it from the same browser as I'm signed into Cloudflare, it throws an error about SSL protocol error. Works fine in an incognito browser and on other devices, doesn't work in cli via CURL from the machine where I'm logged into Cloudflare. Close the browser where I'm logged in, reopen browser, works fine everywhere. curl: (35) OpenSSL/3.0.13: error:0A00010B:SSL routines::wrong version number I feel like something along this lines has happened before when adding the custom subdomain to a worker, but this is the first time I've chased down this level of detail....

Can we do Nextjs ISR on workers?

i saw this on cloudflare discussion page where it says ISR is not supported but on cloudflare docs it says workers support ISR ? im using opennext on cloudflare workers...
No description

WebSocket Pricing for Workers WITHOUT Durable Objects

Hello everyone, I'm looking for some clarification on the pricing model for Cloudflare Workers that use WebSockets but do not use Durable Objects. The documentation for Durable Objects clearly states that a 20:1 ratio is applied to incoming WebSocket messages (https://developers.cloudflare.com/durable-objects/platform/pricing/) for billing, but there's no equivalent information for WebSockets used without Durable Objects. It's not clear how these connections are billed - is a persistent WebSocket connection treated as a single request, or are there other metrics that apply?...

New to the workers - slow response

Hi, I'm trying to showcase my management latency improvements that we may gain serving api responses from CDN workers. I've created simple app using Hono and Cloudflare KV, deployed it using npm run deploy. API is working but it is slow, when I try it from different locations - for some of them it responds > 20s. Am I missing something? Is there maybe some switch I need to turn on in Cloudflare Dashboard for it to work production-like...
No description