1101 (exception) only kills the request, 1102 (resources) kills the isolate.

1101 (exception) only kills the request, 1102 (resources) kills the isolate.
14 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
kian
kianOP2y ago
When the client disconnects, all tasks associated with that client request are canceled. Use event.waitUntil() to delay cancellation for another 30 seconds or until the promise passed to waitUntil() completes.
It seems so I don't know if that means disconnects as in the response body has been fully read, or a mid-request disconnect.
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Constantin
Constantin2y ago
is there a better way to group thinks like kv_namespaces under a specific env, withoud the need to use env.... each time ?
No description
boof
boof2y ago
Kinda confused why my DO alarm is not being triggered every 10 seconds In one of my DO endpoints I have this
this.state.storage.setAlarm(Date.now() + 10 * 1000)
this.state.storage.setAlarm(Date.now() + 10 * 1000)
checking the CF logs, it only gets triggered once (in 10 seconds after creation)
Hello, I’m Allie!
There’s an easy solution to all the TOML ick: Use wrangler.json
ACS
ACS2y ago
Hello, Is fetch inside workers automatically cache POST request with custom cacheKey ? Or I have to clone the request and change the method to GET then use the Cache API ?
Erisa
Erisa2y ago
You need to change the method since the cache layer the api interacts with rejects and will ignore POST requests Example here https://developers.cloudflare.com/workers/examples/cache-post-request/
Cache POST requests · Cloudflare Workers docs
Documentation for Cloudflare Workers, a serverless execution environment that allows you to create entirely new applications or augment existing ones …
ACS
ACS2y ago
In this example, can I use cf: { cacheKey: hash } instead of pathname ? I just test it, It seem that Cache API respect the cf in the request object.
Constantin
Constantin2y ago
what happens if a worker is in a middle of execution and a deploy just takes place? does the process gets terminated immediately?
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Erisa
Erisa2y ago
By deploy do you mean you deploying a new version of the worker or us deploying a runtime update? For your worker deploys, nothing happens. Open connections continue to run, and complete. When we push a runtime update, Workers are given 30 seconds to finish before terminating (documented here https://developers.cloudflare.com/workers/platform/limits/#duration)
Constantin
Constantin2y ago
yes, i was reffering to worker deployment as part of the (wrangler deploy) cmd
Erisa
Erisa2y ago
Gotcha, then nothing happens. In-flight requests will complete without interruption with the version of the Worker they were started with. Future requests will be served with the new version of the script.

Did you find this page helpful?