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

cloudflare workers consuming too many api requests for one webpage

Everytime i get make a request to my full stack app in cloudflare pages , 40-60 cloudflare requests are happening & which is consuming my daily limit of workers quickly. Is there any way to minimize the number of requests worker send when i request a web page or can i cache somehow so my users can't request same webpage multiple times to workers & so i can save my workers requests for other users ? Please suggest what are u doing to override these problems

I m trying to run a js worker that calls

I'm trying to run a js worker that calls a rust library (using wasm_bindgen). I haven't found any examples that do this. I've only seen rust-only workers using worker-build. I get Trace: wasm.__wbindgen_add_to_stack_pointer is not a function. Could anyone know what I should try?

I m using D1 and trying to apply a

I'm using D1 and trying to apply a schema.sql file onto it. However, a few statements don't get read (Parsing 3 statements -> Executed 1 command in 9.842563999816775ms), with no error messages. I've narrowed it down to the INSERT INTO command. The first one works, but the next ones don't. 😅 I don't know what to do

Does anyone here know any decent

Does anyone here know any decent distributed databases for CF Workers? I am using MongoDB with their HTTP Data API right now but my requests are ending up almost 5-10 seconds in some regions. Would be great if any recommendations have full text search....

Integration with Cloudflare Workers – Gr...

hello all. has anyone tested out how the graphql yoga subscriptions work with cloudflare workers? presumably the subscription only lasts as long as the worker http request remains active (server sent events not ws) ..... https://the-guild.dev/graphql/yoga-server/docs/integrations/integration-with-cloudflare-workers

Logs & Websockets

logs will show up once the ws connection has been terminated, from my experience

TBH by far the easiest way to migrate

TBH, by far the easiest way to migrate from Drive to R2 is to get a cheap, high-bandwidth VPS for a day, transfer everything with RClone, and then shut it back down. While you might be saving yourself a dollar or two, the amount of work required to do it would probably cost you more

Could you use a worker to be a websocket

Could you use a worker to be a websocket client? Like say I make a request to wake up a worker, then that worker then connects to a websocket server and waits for messages, then when new messages come in it processes them (or a durable object doesn't really matter)

Question: Are there any plans to support

Question: Are there any plans to support code splitting in workers? i.e: ```typescript ...

Can you create two asyncs in one

Can you create two asyncs in one cloudflare worker? Im trying to apply custom CSS & apply a cookie under a condition but the required responses are different. Not sure how to merge these together

```

Your worker called response.clone(), but did not read the body of both clones. This is wasteful, as it forces the system to buffer the entire response body in memory, rather than streaming it through. This may cause your worker to be unexpectedly terminated for going over the memory limit. If you only meant to copy the response headers and metadata (e.g. in order to be able to modify them), use `new Response(response.body, response)` instead.
Your worker called response.clone(), but did not read the body of both clones. This is wasteful, as it forces the system to buffer the entire response body in memory, rather than streaming it through. This may cause your worker to be unexpectedly terminated for going over the memory limit. If you only meant to copy the response headers and metadata (e.g. in order to be able to modify them), use `new Response(response.body, response)` instead.
^ I don't understand this, as I don't even have a .clone() in my script....

For log storage what makes the most

For log storage, what makes the most sense to use as a backed? R2, D1, or KV? Or something else?

Right now I have built a website that

Right now I have built a website that hides pricing unless a cookie is present. I am using cloudflare workers to restore pricing information through styling when the cookie is present. However, this worker is breaking the "Add to Cart" functionality on my side

You could have a custom esbuild setup

You could have a custom esbuild setup for Workers that strips ?module when building?

This was autogenerated by workers Using

This was autogenerated by workers (Using Custom Domains and routes off) and its been sitting like that for 4 days now. If I go to custom domains on the worker, it says Initializing.