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

401: Workers MCP server

As following "https://github.com/cloudflare/workers-mcp" steps, i deployed and can find mcp functions in Claude desktop app, but when send prompt, it shows Fetch failed. Got (401) Unauthorized, as ''I tried to send a greeting to your Workers server, but it looks like there was an authentication issue. The server returned a 401 Unauthorized error.''', thanks
No description

Workers: Concatenating a large ReadableStream and a footer?

Hey! I have a large document that i get with fetch and i need to pipe it to my client through a response. The file is too large to fit in the worker memory so I am streaming it. Is there any way to concatenate the stream and a footer(for now, 127 null bytes) in a non cpu and memory intensive way?...

Multiple websockets from single worker

Hi, is it possible to have a single worker connect to multiple Durable Objects via websockets? And if so, is there any example code that I can follow? Thanks in advance!

Worker logs timestamp wrong?

Hi, I have some logs that I am sure are mis-timestamped. I am viewing them in the workers logs pane. Hovering over the timestamp shows the correct time as show in the screenshot. Is this a known issue?
No description

JS <=> Rust worker streaming

Hi I'm trying to calling from JS service to Rust service using RPC. the RPC output (and input) is limited in 1MB to I have to use stream to bypass the limit I tried with ```rust...

Cloudflare Workers and Cache issues for UTM params

can anybody help us to setup a worker for us which actually hits cache when we visit the page through utm params? we have one home page which is already being cache and we also have setup apo plugin on wordpress website. We have high number of users which are coming from ads and as they have moer utm params its bypassing our cache always which really degrade our web vital scores. Can anybody please suggest any way to fix this thing? We have setup worker as well which is also fetching from cache though not sure it has lot of high miss cache ratio nearly like around 30% times still...

General question about cron worker limit in place

Hi, I am working on some self project poc and come up with the obstacle on the limit of 5 cron triggers in free tier. Currently I separate my functions into 1A,1B,1C,1D, 2, 3. Function 1 runs in every 5 minutes, function 2 runs every day, and function 3 runs every minute. Ofc I can pay-2-solve the problem or just combining workers with similar purpose to one single worker which runs different part of the code in different intervals. But that defies the orginal purpose of separating the codes for better readability and easier maintainance....

Trouble binding subdomain to workers

Hi - I have my domain set up in cloudflare and I would have thought it would be straightforward to bind a trigger to the domain. I have my routes ``` "routes": [...

Queue always retries

I have a queue consumer that's literally ACK-ing messages: ``` export default { async queue(batch: MessageBatch, env: Env, ctx: ExecutionContext) {...
No description

OpenNext worker apis not working properly in deployed environment

Hello, I have an OpenNext worker, with an api route /api/subscribe. Here is the endpoint: ```Typescript import { NextResponse } from "next/server" import { getCloudflareContext } from "@opennextjs/cloudflare";...
No description

Workers service binding Typescript types uses Rpc.Stub<null>

Hi team, I cannot get TS return types working as expected when calling a method via service binding between Workers. My goal is to have the service return in the form: ```ts type ServiceResponseSuccess<T> = { data: T;...

Run javascript sandboxed

I know that workers have their eval command disabled, but is there a way to use a cloudflare worker as a way to execute javascript in a sandboxed environment? For example, I send a payload to my worker containing some javascript code, and the worker executes the javascript safely and returns the result...

crazy spikes of CPU time. how to troubleshoot?

I realise on my app there are some crazy spikes of cpu time. i am averaging at 5-10ms for hours and then all of a sudden all requests are at 500 or more. overtime it builds up to account for a lot. what are ways to check in more detail what exactly is causing this?

Route pattern must include zone name [code: 10022]

I am using Cloudflare for SAAS so I have customer domains point to like customers.mydomain.com When I deploy my worker I have the routes like the following in my config file: ```json "routes": [ {...

Can I use Cloudflare Browser Rendering CDP outside cloudflare worker?

is it possible to get the WebSocket or http url for Browser Rendering CDP? I want to use the Browser Rendering with python for browser-use.com

If I have a queue and attach a producer/consumer worker, how many requests am I being billed?

The details are basically a worker enqueues one message (which constitutes to one row inserted into a 'clicks' table in DB), I want to consume any messages as often as possible (like a 30 second max consistency) to write into my Supabase DB, batching is preferred if it saves $$. I want to just design this realistically where I'm not burning money if I enqueue a million messages a month, etc.

#3603 appears in the 2025-03-03 release but still not available

Here is the release: https://github.com/cloudflare/workerd/releases/tag/v1.20250303.0 Here is the PR# listed: - Implement node:crypto sign and verify APIs by @jasnell in #3603 ...

Next.js + D1 + SSG .. would that work?

Hi, not sure if this has been answered before .. also posting my first ever message on discord.com I am building my app with Next.js and Deploying it to Cloudflare workers. I am trying to build SSG pages using data from D1 .. will this work? When the query to get the slugs is executed, I get "Error: D1_ERROR: no such table: blog_posts: SQLITE_ERROR" when workers build is running...

Queue stuck until manual Send Message from Cloudflare Dashboard

Recently, my queue frequently stuck. This is the producer code (never changed since forever): ``` router .post('/nudge/jobs', async (req: Request, env: Env, _ctx: ExecutionContext) => {...
No description