Interactive engineering lab

Activity timeout timeline: queue waits, retries and total deadlines

Change scheduling and attempt budgets, inspect deadline decisions and export a reproducible virtual timeline.

By Sandeep Belgavi · Published 2026-12-04

Synthetic local computation. No model or remote service is contacted.

Experiment workspace

Decision trace

    The mechanism

    The worker backlog and the work itself consume different intervals. This local model schedules one logical activity, waits for worker pickup, executes an attempt and applies fixed retry backoff after a failure. A queue-wait deadline applies to each attempt. An attempt deadline restarts at pickup. The total deadline begins at the initial scheduling event and never restarts. A heartbeat failure is simulated when the configured gap between reports reaches the heartbeat timeout. Setting heartbeat timeout to zero disables that simulated detector.

    Synthetic fixture and controls

    The default fixture waits four seconds in the queue, runs eight seconds, fails its first attempt and waits three seconds before retrying. Queue and attempt limits are ten seconds; the total limit is twenty-five. Every numeric control is an integer in seconds except the attempt and failure counts. Change one input, run again and compare the exact event trace. The model rejects out-of-range or nonnumeric values. It has no randomness, so the same exported inputs reproduce the same result.

    Expected outcomes

    The default reaches its total deadline at 25 seconds during attempt two. Set total limit to 30 and it completes at 27 seconds. Set queue limit to 3 and it fails at 3 seconds with zero attempts started. Set failed attempts to zero and it completes at 12 seconds. The heartbeat preset has a 2-second heartbeat timeout and a 5-second reporting gap, so each started attempt fails that check; the total deadline or attempt cap then ends the logical activity. Deadline expiry wins ties in this teaching model.

    Read the decisions

    A scheduled event means a task is waiting, while started means a worker has picked it up. Application failure, start-to-close and heartbeat failure can trigger another attempt if the attempt cap and total deadline permit it. Schedule-to-start is terminal here, reflecting the documented non-retryable queue-timeout behavior. Schedule-to-close is always terminal. The trace controls reveal one event at a time or all events. The elapsed-time metric ends at the accepted terminal event, not at a hypothetical remote operation completion.

    Experiment before choosing a policy

    First predict whether the queue or execution clock will fire, then change queue wait across the queue-limit boundary. Next increase the total limit without changing the attempt limit. Observe that allowing more attempts cannot repair a queue timeout. Compare a longer backoff with a larger attempt cap: both can leave less useful work before the total deadline. These experiments help identify which operational measurement is missing before changing production timeouts. Export records the chosen inputs, outcome, started-attempt count and complete decision trace.

    Limits and production verification

    This is a deterministic arithmetic simulation, not a Temporal worker or server. It does not emulate cancellation delivery, workflow replay, exponential retry policy, network jitter, worker concurrency or remote side effects. Heartbeats are represented by a fixed gap, not a packet stream. Equality handling is an explicit simulator convention. A timeout does not undo an external write or prove that remote work stopped. Before deployment, repeat relevant scenarios in the chosen workflow engine with idempotent activity adapters, lost acknowledgements, worker crashes and cancellation tests. The linked article explains what remains deterministic and when an agent adds no value.

    Views are my own and do not represent any employer, past or present.