A Start-To-Close Timeout is the maximum time allowed for a single Activity Task Execution.
Start-To-Close Timeout period
A Retry Policy attached to an Activity Execution actually retries an Activity Task Execution. Thus the Start-To-Close Timeout is applied to each Activity Task Execution within an Activity Execution.
Start-To-Close Timeout period with retries
The default Start-To-Close Timeout is the same as the Schedule-To-Close Timeout.
An Activity Execution must have either this timeout (Start-To-Close) or the Schedule-To-Close Timeout set. We recommend always setting this timeout, however make sure that it is always set to be longer than the possible maximum time for the Activity Execution to take place. For long running Activity Executions, we recommend also using Activity Heartbeats and Heartbeat Timeouts.
The main use case for the Start-To-Close timeout is to detect when a Worker crashes after it has started executing an Activity Task.
If this timeout is reached the following takes place:
- An ActivityTaskTimedOut event is written to the Workflow Execution's mutable state.
- If there is a Retry Policy that dictates a retry, then the Temporal Server schedules another Activity Task.
- The attempt count increments by 1 in the Workflow Execution's mutable state.
- The Start-To-Close Timeout timer is reset.