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

Worker Environment

When request comes into the worker you have two objects (context and environment). Is environment scoped to the specific reqeust like context or is shared across the requests? Example if I set some unique value on environment, will it stay in that request or it can leak into other requests. Afaik context is scoped to the request and is not leaking (like global scope) across requests in the same worker, but I am not sure if the same is for environment

CPU execution time graph

I want to understand the CPU time usage for my worker, so I looked at a specific deployed version's CPU usage stats. But in this image, I see 3 different numbers for the median CPU time - 210.8ms, 10,973.9 ms, and 5.8ms. Which one is correct? Am I misreading the data?
No description

Uncaught ReferenceError: Buffer is not defined

Hello I'm getting the following error: ```...

Workers Observability Pricing Typo

FYI: the example 1 pricing for the new workers observability should say 15,000,000 per month instead of 1,500,000. The current example would be free at 3M logs per month. https://developers.cloudflare.com/workers/observability/logs/workers-logs/#example-1...
No description

HTTP sitemap 520 error

My xml maps are fine, but my google sitemap prompts can't be crawled, sometimes again. How can I solve this problem
No description

What is the best way to run an Integration Test for my Worker that uses the Rate Limiter API?

Hey there, I have a worked that uses several different middlewares and one of them is based on the Rate Limiter API to limit requests to my Worker. I found that miniflare doesn't support testing with Rate Limiter API, so I was wondering what is the best way I can do an integration test at the moment. There are no documentation about it.

WebSockets (socket.io)

Is cloudflare workers hosting supports websockets (socket.io) ? (Socket.io, wss, ws, https)...

Disabling Log Redaction in Modern Cloudflare Observability Logs

Hello everyone, I’m currently utilizing Cloudflare Workers along with the modern observability logs as outlined here: Workers Logs. I’ve noticed that all URLs in the logs are being redacted. For example:...

Change Worker name without losing metrics and logs

Is there any way to change a worker name without losing all the metrics and logs? And if not, do you plan to make this possible in the future? Thanks

RPC, `using`, Experimental Wrangler and Observability

When making RPC calls through a Service Binding, it's recommended (https://developers.cloudflare.com/workers/runtime-apis/rpc/lifecycle/#how-to-use-the-using-declaration-in-your-worker) that we employ the using keyword to enable automatic cleanup. To use this, we're forced to use the wrangler@using-keyword-experimental version so that the using keyword is transpiled properly upon deployment. Unfortunately, this version of wrangler seems to be incompatible with the new observability setting that's available to us in wrangler 3.78.6. Is there another way to handle RPC call cleanup without using the using keyword so that we can not bump into incompatibility with new features that are released?...

worker not returning jwt payload

I am trying to use jose library to verify jwt in workers but it seems like I am just getting a 200 without any data in the response. I am unsure what's going on. parsedJwt.payload is serializable and it should go in the error catch block if it errors out. So I am unsure why am I not getting any data in the response but the status code is set correctly to 200 ```typescript import { parse } from 'cookie';...

Leverge multi-tenency while deploy web application with user generated data

Posted a broader question to fully grasp on how can I built using Cloudflare Stack. Requirements: * Deploy a web application which will server the user generated content * User can set custom domain to the web application...

How configure workers with assets for intercept public/index.html

i have wrangler.toml: ```toml name = "my-worker-assets" main = "src/index.ts" compatibility_date = "2024-09-25"...

Caching across multiple parallel worker requests

What happens if you have multiple parallel worker requests from same colo that make use of the Cache API and there is a Cache Miss, the key/data stored in the Cache API is the same in all requests. - Do all the worker requests try to hit the origin at once or are things smart enough to so that only one worker request hits the origin and the rest will pull from the Cache?...

how to hit on external API with port

:8200 So I have this API with this port "..com:8200" the issue is it work in dev but it gives warning that it won't run in prod because of prod what's the work around...

remix worker asserts help

I saw now remix framework worker asserts support is using pages functions build --outdir build/worker. is this anyway to add queue or email entrypoint to it?

Is waituntil() necessary in scheduled cron?

I noticed I haven't been using waitUntil but my async tasks are all finishing successfully.

Today released break prod

Today i wanted to try the new logs system and added it in the wrangler config. Then deployed and the workers cannot connect to my db anymore. So i removed the setting and publish again....

worker ai extremely slow >15 sec any model on local wrangler dev

anything I have to do locally for running in wrangler to get that response time down?
No description