diff --git a/.changeset/retry-run-start-on-connection-error.md b/.changeset/retry-run-start-on-connection-error.md new file mode 100644 index 00000000000..3624ee1b7c5 --- /dev/null +++ b/.changeset/retry-run-start-on-connection-error.md @@ -0,0 +1,5 @@ +--- +"@trigger.dev/core": patch +--- + +Transient connection errors when a run starts are now retried for longer, so a brief connectivity blip no longer sends the run back through the queue and delays its first attempt. diff --git a/packages/core/src/v3/runEngineWorker/workload/http.ts b/packages/core/src/v3/runEngineWorker/workload/http.ts index 43328b7244c..02e5d80b911 100644 --- a/packages/core/src/v3/runEngineWorker/workload/http.ts +++ b/packages/core/src/v3/runEngineWorker/workload/http.ts @@ -165,6 +165,15 @@ export class WorkloadHttpClient { ...this.defaultHeaders(), }, body: JSON.stringify(body), + }, + { + retry: { + minTimeoutInMs: 1000, + maxTimeoutInMs: 10_000, + maxAttempts: 6, + factor: 2, + randomize: true, + }, } ); }