Temporal

Batch Activity Heartbeat Timeout Causing Premature Failures

warning
configurationUpdated Mar 3, 2026

Batch operations running as long-duration activities must heartbeat regularly to signal progress. If ActivityHeartBeatTimeout is set too low relative to processing time per workflow, batch activities will timeout prematurely even when making progress.

Technologies:
How to detect:

Batch workflows fail with activity timeout errors despite making progress. The ActivityHeartBeatTimeout parameter in BatchParams determines how long activities can run without heartbeating.

Recommended action:

1. Review batch workflow failure logs for activity heartbeat timeout errors. 2. Calculate average processing time per workflow in the batch. 3. Estimate total batch duration: (workflow count / Concurrency) * average processing time. 4. Ensure ActivityHeartBeatTimeout is significantly longer than the time between heartbeat opportunities. 5. Increase ActivityHeartBeatTimeout in BatchParams if timeouts are occurring. 6. Verify heartbeat logic is executing correctly in batch processing code. 7. Consider reducing batch size or increasing Concurrency if individual batches are taking too long. 8. Monitor HeartBeatDetails.CurrentPage to track batch progress and ensure heartbeats are occurring.