CanRau
CanRau
Explore posts from servers
CDCloudflare Developers
Created by CanRau on 1/28/2025 in #workers-help
High latency on certain endpoints, can't get Smart Placement working so far
Hey, I'm experiencing pretty high latencies on certain endpoints on a Worker I'm working on, very probably because the Planetscale DB is in Europe and I'm in Perú (although my cofounder being in Frankfurt/Germany also experiences almost 2s slow endpoints which should be pretty close to the db and therefore faster right?), so I'm experimenting with Smart Placement, but as I'm in Perú I can't manually drive European requests and this Worker is still in dev so there's almost no requests other than mine and occasionally my co-founders so I thought trying https://geofetcher.appsinprogress.com/ to generate traffic from Germany, though when logging the cf-ipcountry header from my Worker I always get Perú, which is confusing , so I spun up my own fly.io machine in Europe which was supposed to periodically fetch my Worker but I still get USA, trying https://worldpagespeed.fly.dev/ I get Chicago for all their regions 😵‍💫 any tip on how to "make" smart placement interested in a European location to understand if that reduces the latency? 😇 Also note that from that european fly machine the latency is only about 1/3 around 60ms so it seems very likely to be location related. I'm trying the D1 workaround but so far it doesn't seem to work, as also mentioned there it's not guaranteed 😔 would really love an option to manually specify a location for a Worker
3 replies
CDCloudflare Developers
Created by CanRau on 12/12/2024 in #workers-help
Uncaught ReferenceError: MessageChannel is not defined
Updating different (unrelated) dependencies causes this. At least some seem to be related to React19 (which itself also causes this 🥲 I'm not sure it's directly CF related tho it only happens on wrangler deploy and only after building etc 🤔
Total Upload: 20484.96 KiB / gzip: 3636.26 KiB

[ERROR] A request to the Cloudflare API (/accounts/ddddc353374f7ec886d7d7d97e239a71/workers/scripts/rakkas-cf-origin/versions) failed.

Uncaught ReferenceError: MessageChannel is not defined
at null.<anonymous>
(file://[..]/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.js:126:15)
in
../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.js
at null.<anonymous> (entry-cf.js:32:50) in __require2
at null.<anonymous>
(file://[..]/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/server.browser.js:6:7)
in ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/server.browser.js
at null.<anonymous> (entry-cf.js:32:50) in __require2
at null.<anonymous>
(file://[..]/dist/edge/hattip.js:12:62)
in dist/edge/hattip.js
at null.<anonymous> (entry-cf.js:29:59) in __init
at null.<anonymous>
(file://[..]/dist/edge/entry-cf.js:2:1)
[code: 10021]
Total Upload: 20484.96 KiB / gzip: 3636.26 KiB

[ERROR] A request to the Cloudflare API (/accounts/ddddc353374f7ec886d7d7d97e239a71/workers/scripts/rakkas-cf-origin/versions) failed.

Uncaught ReferenceError: MessageChannel is not defined
at null.<anonymous>
(file://[..]/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.js:126:15)
in
../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/cjs/react-dom-server.browser.production.js
at null.<anonymous> (entry-cf.js:32:50) in __require2
at null.<anonymous>
(file://[..]/node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/server.browser.js:6:7)
in ../../node_modules/.pnpm/[email protected][email protected]/node_modules/react-dom/server.browser.js
at null.<anonymous> (entry-cf.js:32:50) in __require2
at null.<anonymous>
(file://[..]/dist/edge/hattip.js:12:62)
in dist/edge/hattip.js
at null.<anonymous> (entry-cf.js:29:59) in __init
at null.<anonymous>
(file://[..]/dist/edge/entry-cf.js:2:1)
[code: 10021]
Update: nodejs_compat is already enabled in my wrangler.toml
23 replies
CDCloudflare Developers
Created by CanRau on 4/22/2024 in #workers-help
Move route from 1 worker to another without downtime?
I have a running Worker with a route which proxies basically the whole domain, now I'm starting to use Environments and want to leave the naming to wrangler etc so it's creating a new Worker with -production appended, also want this to have deploys be more explicit -e production so wouldn't want the top-level to be production config. Though when trying to deploy it's complaining about another Worker already using that route. One alternative that just came to mind is renaming the existing worker instead 🤔
2 replies