well happened to me on svelte worker assets but same happens with https://github.com/cloudflare/agen

well happened to me on svelte worker assets but same happens with https://github.com/cloudflare/agents-starter if you add a .dev.vars in the root
GitHub
GitHub - cloudflare/agents-starter: A starter kit for building ai a...
A starter kit for building ai agents on Cloudflare - cloudflare/agents-starter
17 Replies
Kevin
Kevin•2w ago
any thoughts on sub request just closign networ connection lost after 100 seconds? it doesn't make sense to time this out for a backend request thats making a long running request
Tobias
Tobias•2w ago
Is there any way I to get custom domains without a zone on cloudflare working on Workers w/ Static Assets? I've only noticed just now and it's too late to go back - impossible to get the domain on Cloudflare.
wot
wot•2w ago
are worker "frameworks" replacing pages?
Chaika
Chaika•2w ago
The Cloudflare wide Proxy Read Timeout is 100 seconds https://developers.cloudflare.com/fundamentals/reference/connection-limits/, if your backend is that slow you'll need to speed it up, have it use a job style where it returns that it's running and to poll for status, etc. For SSE specifically, I haven't tried it but there's a few posts mentioning it kind of works and that 524's only trigger if nothing is sent within 100s Not if you have no zones at all. If you have at least one, even just a throwaway/random ones, can use CF For SaaS: https://developers.cloudflare.com/cloudflare-for-platforms/cloudflare-for-saas/start/advanced-settings/worker-as-origin/ and have your real custom domain CNAME to it, which then would run your worker. More meant for full SaaS cases though. It's the same thing Pages uses under the hood Frameworks is just their list of guides in the docs, "Workers Static Assets" is the underlying replacement, allowing Workers to support static assets just like Pages. CF has said before they plan on offering more migration steps in the future to Workers Static Assets from Pages, but eventually they will converge
TDat
TDat•2w ago
Unable to preview your Worker
matt // unweb
matt // unweb•2w ago
if a worker connects to a cloudflare tunnel endpoint, and there's a WAF rule to block any non-worker traffic, eg.
BLOCK cf.worker.upstream_zone != "my.domain"
BLOCK cf.worker.upstream_zone != "my.domain"
how much latency should both the WAF rule & cloudflare tunnel be adding?
Chaika
Chaika•2w ago
waf should be too small to measure, tunnel is more complex. I'd make sure you're connecting to a nearby PoP ( example.com/cdn-cgi/trace on your tunnel hostname) and in your tunnel logs, that your tunnel is connecting to a nearby location as well, not too related to Workers though
masd4
masd4•2w ago
if the worker memory limit is 128mb, wouldn't I run into that if I use the kv store .list() operation and retrieve 1280 keyvalue items with a size of 100kb? I mean those string values get loaded into memory if I .get() them all one by one in a for loop? I guess the GC would be able to start running if that's how it works in a loop with a memory limit set.
Tobias
Tobias•2w ago
thanks so much! this worked well
Justin Schroeder
Justin Schroeder•2w ago
Cloudflare Team: Does this https://discord.com/channels/595317990191398933/1040420029080018945/1354117859671805964 announcement mean that ctx.waitUntil() can have a longer execution time too. Its been 30s of wall-clock duration, and I could really use an increase time limit there.
Unknown User
Unknown User•2w ago
Message Not Public
Sign In & Join Server To View
Walshy
Walshy•2w ago
no, waitUntil hsa not changed
Justin Schroeder
Justin Schroeder•2w ago
Cool cool cool. Any chance they might happen in the near future? 😂
matt // unweb
matt // unweb•2w ago
in this worker code im measuring time to hit origin. it starts off ~350 and then after a few refreshes, becomes a mixture of ~350 and ~100 is this TCP or HTTP keepalive at play? are there any viewable stats, or any ways that I can get the ~100 to occur more frequently?
const start = performance.now()
await fetch('https://unweb.io/healthcheck').then(x => x.text())
return new Response(String(performance.now() - start));
const start = performance.now()
await fetch('https://unweb.io/healthcheck').then(x => x.text())
return new Response(String(performance.now() - start));
divby0
divby0•2w ago
I read something somewhere (a while ago) about workers being favored in the future in place of pages. Did I read that wrong? Can't find anything on pages getting deprecated or something.
Vero
Vero•2w ago
Hey. Pages is still supported but longer term we want to get to a point where every new application can be built on Workers

Did you find this page helpful?