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

More worker Req Needed

In a paid plan, we get a lot of things like KV, D1, AI etc stuff with higher limits. But for my use case, I do not need all the other stuff. I just need more worker requests. ...

Problems with basic Puppeteer setup

Hi there! I've setup a basic Worker project using npm create cloudflare@latest. After that, I installed @cloudflare/puppeteer, updates my wrangler.jsonc to include the binding, and set the required compatibility flags. ...

httpServerHandler + Fastify

Probably not a worker issue, but I'm trying to get httpServerHandler working with Fastify First error is ```...

Secrets purged except for 1?

in my dev/preview environment, all of my secrets just randomly got deleted except for one.
No description

Why do I have 300-500ms latency on simple GET requests?

I have a Worker connected to a D1 binding and making really simple GET requests are taking 300-500ms, surely this should be more around 50-100ms?

Worker for origin routing between two hosts (NextJS apps)

I'm looking to setup a worker which essentially setting up an origin rule to redirect users to another hosted domain / NextJS app. For example, when they go to the origin path, they are then re-routed to the target path. Origin: https://www-staging.host.com/login Target: https://app-staging.host.com/login...

Cloudflare images

Iam using nextjs with cloudflare workers i followed the documentation on how to integrate with cloudflare imaged but my static images aren’t optimised to webp. That is the problem Thank you...

New to Workers, looking for some guidance

Hi all, I've been tinkering with Cloudflare for the last couple of days and a couple of questions have piled up in my head. I hope someone can shed some light on some or all of these: 0) I have a FusionAuth server running on a VPS and I want to build out frontend for the authentication flows using Workers - is this feasible in general?...

API request being blocked, presumably due to Worker IP?

My app needs to call the UK government's data API. This works fine if I test locally (I get a JSON 200), but not when I test remotely or deploy my app (the response is a 403 forbidden). Is there anything I can do about this or has anyone faced anything like this before? Obviously, serverless being what it is, IPs are not fixed, though I would have expected my app's IP to be UK-based when I call it from the UK....

Random Error 1102 (“Worker exceeded resource limits”) but metrics show low CPU. How do I debug this?

Summary / context - Stack: hono + trpc serving a React Router 7 app. - I intermittently get Error 1102 when visiting the site: “Worker exceeded resource limits”. - I attached two screenshots: Worker metrics and the 1102 error page. - I read the CPU time docs (link: https://developers.cloudflare.com/workers/platform/limits/#cpu-time)....
No description

Workers build failing on monorepo nextjs project

The build fails and tells me to contact support if the problem persists (which it has). It looks like the build command tries in a loop and then quits with an internal error. 14:19:59.072 Monorepo detected at /opt/buildhome/repo 14:19:59.151 Next.js version : 14.2.3 14:19:59.151 OpenNext v3.7.6...

Stale doc for Durable Object storage?

https://developers.cloudflare.com/durable-objects/best-practices/access-durable-objects-storage/#remove-a-durable-objects-storage "However if you ever write using Storage API.. ..explicitly call.. ..to empty storage..". then showing code for clearDo. My question: Who will call this function? It's not part of DurableObject....

Worker exceeding CPU limit?

I'm not quite sure why, but my code runs fine on my PC (in dev mode) but the Worker is always failing because of an exceeded CPU limit? Any idea why? - https://github.com/The-LukeZ/twitter-x-discord-forwarder/blob/master/src/index.ts...

Real time logs not connecting

Just a minor issue for me, but my Real Time Worker logs are not connecting. The console looks like its missing some sort of url? Does someone know what is going on here? Edit: After waiting for a couple of seconds, it does connect eventually but it seems like it's canceling the connection every few seconds....
No description

uncaught exception; source = Uncaught (in promise); stack = Error: Network connection lost.

All of a sudden I've started seeing errors whenever I try and run a worker locally. This include a simple "hello-world" worker. When I run it, no requests reach the worker. I added --log-level debug and I see a constant stream of exceptions that look like this: exception = kj/async-io-unix.c++:1538: disconnected: connect(): Connection refused ...

OG metadata / link previews not working in some apps

Since a few weeks ago, link previews are no longer working when I post links to any of my Workers or Pages sites in certain apps---most notably Slack and Lucid (https://lucid.co). Link previews worked fine in these apps before, and some of my sites I haven't changed since months ago. Link previews in other apps (LinkedIn, Facebook, Mattermost) all work fine. I cannot for the life of me figure out what is going on. 🤔 Any ideas?
No description

Caching to avoid zone hits

Hello, Good morning : ) I want to ask that if it is possible that we can cache the response of a route in the cloudflare so that it does not hit the worker script for the response and directly uses the cached one ? The response of the url updates on every sunday, and I am planning to implement SSR for it but I am unaable to figure out how do I cache it so that it does not invoke my worker everytime for the same response generation....

New commits are not getting deployed.

Recently GitHub had flagged my account so maybe because of that auto deploy is not working. I am getting remote: Repository not found errors. Is there any way to push changes to the same worker ? I tried to disconnect the integration and connect it again, but i couldn't find any button to connect my github account back....

Pages, Functions, 404s

Hi, I am having a lot of trouble getting my site live. I have already tried using chat gpt to trouble shoot everything but i still get 404 errors. It seems like theres an issue with Functions working on the page, but I cannot figure out how to fix it. These are the instructions chat gpt gives me, but I do not see an "Enable Functions" button... In Cloudflare Dashboard → Pages → Your Project → Settings → Functions,...
No description