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

Whats the best approach to auto-generate monotonic uuidv7 as the primary key

At the moment im using a library to generate a uuidv7 during an INSERT. Is there a better approach to auto-handle this?

No fetch handler!

Hello! I am having trouble with my worker. It is an Email Worker for email routing and I am getting the error "No fetch handler!" I was wondering what this error means. I don't think it's an issue with my code, since one of the example email workers is very similar. Maybe I've set it up incorrectly? I've attached my code and the error. ```js export default { async email(message, env, ctx) {...
No description

build failing for html/css build/deploy using github for workers

i have a simple html/css site im trying to deploy, but the build keeps failing and i only see the default "hello world". i have linked to my github repo, and it seemed that when building it was having trouble finding the index.html so i edited the deploy command to npx wrangler deploy ./index.html. but i still have the error and the build is failing: ```Success: Finished initializing build environment 14:26:21.460 Cloning repository... 14:26:23.103 Detected the following tools from environment: 14:26:23.106 Executing user deploy command: npx wrangler deploy ./index.html...

Is there a speed limit for workers to perform vectorize or other operations? Will there be speed res

Is there a speed limit for workers to perform vectorize or other operations? Will there be speed restrictions like HTTP?

Can't add a new domain to my account

I can't add a new domain to my account Always getting "internal server error" when I select the free plan during setup...

Canonical redirect doesn't seem to work - likely misconfiguration

I am hosting a simple webiste on workers. I have set everything up and everything seems to work. I set custom domains and the pages work. But I wanted to use worker to redirect from TLD to www for cannonical redirect. But that doesn't seem to work. Since there are no logs the worker might not be triggering at all? No idea I am super confused at this point and need help....

.gitignore for CloudFlare Static Site

I used this command to make a project per Cloudflare instructions: npm create cloudflare@latest -- mysite-tld And I chose the Hello World Example with Static Site template using Git. No .gitignore file was created, so I'm trying to figure out what should be in there......

Workers: not_found_handling: single-page-application - does this only work in HTTPS?

I'm trying to get a local worker working, serving an SPA via vite. I configured "not_found_handling": "single-page-application", and according to the docs, this should serve the static assets during a navigation request. Problem is, Firefox nor Chrome, will send the Sec-Fetch-Mode: navigate header if the protocol is HTTP, only in HTTPS. I just want to confirm this known/expected, or if something's wrong with my setup....

Integrating live reload for Workers Assets on Mkdocs-based site

I migrated my Mkdocs-based site from Pages to Workers Assets and I am figuring out if I have correctly integrated mkdocs build command (I use pipenv's scripts config on that) for use in wrangler dev --live-reload. Does this work or do you have any possible workarounds on forcing a build if stuck? My config in nutshell: https://gitlab.com/andreijiroh-dev/website/-/blob/main/wrangler.jsonc?ref_type=heads (Pipfile at https://gitlab.com/andreijiroh-dev/website/-/blob/main/Pipfile) disclaimer: I am on NixOS so I have a devenv.nix config on the repo if you need to reproduce....

Pipelines configuration

I am testing Pipelines to store some data on a R2 bucket and I have a question I couldn't find in the docs: - How can I change the name of the binding? By default it is created as PIPELINE but I need to give it a meaningful name on my application's domain...

More disk on Workers CI/CD

Hi, everyone. I have an SSG website with Astro at Pages. I'm trying to migrate worker static assets following migration guide. I'm facing "ENOSPC: no space left on device" failing at build. I know the limit....

Not receiving notifications for Worker Standard Requests

Hello, I'm trying to set up an email notification for when the total number of Worker Standard requests exceeds a specific threshold. However, I'm not receiving any notifications to my email. I've checked the Workers and Pages overview page and can see the number of standard requests that have been made. I then set my notification threshold slightly above that number, but I’m still not receiving any email alerts. Could you help me identify what might be going wrong?...

Help Identifying Correct Bindings

I need help choosing the correct bindings for a very simple AI API. I accidentally deleted the binding yesterday, and it seems to throw Error 1101. Should I add the Workers AI binding? If so, what should I name the variable? Code: ```export default { async fetch(request, env) {...
No description

Multipart uploads fails in certain situations, gives no comprehensive error message

Hi there! Working on an archiving function for R2 using Workers. I have attached the code for anyone willing to replicate. Sometimes, the function works without error (or rather, with certain file configurations), but other times it fails upon trying to complete the multipart upload. I have attached the logs for both a success case and a error case. Can anyone more savvy see any reason for this failure? This has had me scratching my head all day, trying to both brain code and vibe code the issue away, but to no avail. Thank you for your time! :MeowHeartCloudflare:...

D1 randomly spikes leading to >10s wall time on the worker. CPU time <50ms.

Hi cloudflare devs, I have a D1 database that I'm using for my production use-case. It is a very small db, but from day 1, I've been facing random >10s wall time on my workers on random db operations. I've optimized queries. This was okay until I was the primary user, but I'm now looking to having more tenants and at a 1 db/tenant architecture, so therefore reaching out for help, as I would like to keep using D1.

Stop db connection usage from rising while avoiding "Cannot perform I/O of a different request"

I'm trying to create a db connection function that doesn't create a new db connection for every new request. I'm using Kysely and MYSQL: ``` export function useDb() { return new Kysely({...

trpc call to hono backend from react router 7 is not working

Only when I try to make api call from rr7 to hono backend it is not working on Workers but working on localhost

dev.vars.<environment-name> is not getting picked up

Following is my wrangler.toml ``` "$schema" = "node_modules/wrangler/config-schema.json" name = "project-name"...

I am hosting wordpress with ols and mariadb. I exposed the website with cloudflared tunnel

I am hosting wordpress with ols and mariadb. I exposed the website with cloudflared tunnel but the issue is, the website doesnt work properly or load elements as expected.

Alarm not working for Durable Objects in production but locally its working

i have a worker having 3 surable objects . my durable objects have alarm ehich triggers after 2 & 3 minutes ( for testing ) . locally i can see in debug seesion that my alarm block is invocked but in other enviroment like staging i am my alarm is not triggered as i cant see the alarm invocation in cloudflare . what is the reason ?