Skip to content

TransferTimeoutPolicy

Defined in: src/transfers/TransferJob.ts:74

Timeout policy applied by the transfer engine.

Two timeout scopes exist with deliberately different failure semantics:

  • Job scope (timeoutMs): covers the full engine execution including retries. When it fires, the engine rethrows the TimeoutError immediately - the retry policy is never consulted.
  • Attempt scope (attemptTimeoutMs and stallTimeoutMs): covers a single attempt. When either fires, the per-attempt abort controller cancels the attempt and the resulting TimeoutError flows into the retry policy like any other attempt failure, so retryable timeouts are retried (with backoff) instead of failing the job.
await engine.execute(job, executor, {
retry: createDefaultRetryPolicy(),
timeout: { timeoutMs: 600_000, attemptTimeoutMs: 120_000, stallTimeoutMs: 30_000 },
});
PropertyTypeDescriptionDefined in
attemptTimeoutMs?numberMaximum duration for a single attempt in milliseconds. Expiry aborts only the active attempt; the failure flows into the retry policy.src/transfers/TransferJob.ts:81
retryable?booleanWhether timeout failures are retryable. Defaults to true.src/transfers/TransferJob.ts:89
stallTimeoutMs?numberMaximum time without progress before an attempt is considered stalled, in milliseconds. The watchdog resets on every progress report; expiry aborts only the active attempt and the failure flows into the retry policy.src/transfers/TransferJob.ts:87
timeoutMs?numberMaximum duration for the full engine execution, including retries, in milliseconds.src/transfers/TransferJob.ts:76