Jacob Wright
Jacob Wright
CDCloudflare Developers
Created by Jacob Wright on 4/10/2024 in #workers-help
RPC Error handling and retries
The new RPC stuff is really great. One question I have is does the RPC calls handle retries? In my current RPC library I retry on these errors which are not uncommon:
const retryOn = new RegExp([
'Network connection lost',
'Cannot resolve Durable Object due to transient issue on remote node',
'Durable Object reset because its code was updated',
'The Durable Object\'s code has been updated',
].join('|'));
const retryOn = new RegExp([
'Network connection lost',
'Cannot resolve Durable Object due to transient issue on remote node',
'Durable Object reset because its code was updated',
'The Durable Object\'s code has been updated',
].join('|'));
(from https://github.com/dabblewriter/durable-apis/blob/main/src/durable-apis.ts#L12-L17) Usually 1 retry is all that is needed, though I do use exponential backoff to continue trying for up to several seconds. This is built-in to my RPC lib. It would be great if it were built-in to your implementation. I don't want to wrap every RPC call with a try/catch to retry on regular network/lifecycle errors. Thanks!
10 replies
CDCloudflare Developers
Created by Jacob Wright on 3/11/2024 in #pages-help
JS/CSS won't uncache without a purge
Even after the weekend, my JS/CSS files for my Pages deployment are still being cached. I have to run a Purge Cache on those files on every deploy to get them uncached. I thought a deployment would automatically clear those files from the cache. Any strategies to fix this issue? Is it common and I just don't know what to search for? Thank you!
13 replies
CDCloudflare Developers
Created by Jacob Wright on 12/13/2023 in #workers-help
Cannot test locally after wrangler 3.17 - get ECONNREFUSED
Using https://github.com/jahands/do-demo I am able to get tests passing up to Wrangler 3.17. Starting with 3.18 (to 3.20) I get this error when running unstable_dev(...) before the beforeAll() is finished executing. This is the same for my own projects.
TypeError: fetch failed ❯ fetch node_modules/wrangler/wrangler-dist/cli.js:16838:17 ❯ processTicksAndRejections node:internal/process/task_queues:95:5 ❯ Object.fetch node_modules/wrangler/wrangler-dist/cli.js:151422:16 Caused by: Error: connect ECONNREFUSED ::1:52557 ❯ connect ECONNREFUSED ::1:52557 ❯ TCPConnectWrap.afterConnect [as oncomplete] node:net:1495:16
Where/how should I report this?
5 replies