Skip to content

Add a troubleshooting page for Activity Heartbeat Timeouts - #5823

Open
Duncanma wants to merge 1 commit into
duncan/activity-heartbeat-docs-review-2be6fdfrom
duncan/heartbeat-timeout-troubleshooting
Open

Duncanma wants to merge 1 commit into
duncan/activity-heartbeat-docs-review-2be6fdfrom
duncan/heartbeat-timeout-troubleshooting

Conversation

@Duncanma

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds docs/troubleshooting/activity-heartbeat-timeouts.mdx. The page is for readers whose Activities time out on their Heartbeat Timeout even though the Worker is running and the code calls Heartbeat. It covers each place a Heartbeat can be delayed:

  1. Confirm the timeout. Check pending-Activity fields, and count timeouts per attempt with activity_task_timeout{timeout_type="Heartbeat"} (server v1.29+) or the Cloud OpenMetrics equivalent. Final-attempt metrics can stay at zero under the default Retry Policy.
  2. Rule out a crashed Worker.
  3. Rejected Heartbeats. Query service_errors_resource_exhausted by service and cause. A table maps RpsLimit, BusyWorkflow, and PersistenceLimit to the limit involved and what to do.
  4. Slow handling in the server. Workflow lock contention shows in cache_latency and task_errors_throttled. Slow UpdateWorkflowExecution writes point at the database.
  5. Late sends from the Worker. Causes are a CPU-starved Worker, Java's 4 shared heartbeat threads, and retries piling onto a busy Worker.
  6. Lengthen the timeout. Change it in Workflow code, and raise it on pending Activities with temporal activity update-options. Don't shorten it on a running Activity.
  7. Reduce Heartbeat load. Each steadily heartbeating Activity costs 1 request and 2 writes per throttle interval.
  8. Alerting. Alert on Heartbeat Timeouts per attempt, plus the existing SDK NOT_FOUND alert.

Also:

  • Adds the page to the sidebar and the troubleshooting index.
  • Links to it from the encyclopedia's "Choose a Heartbeat Timeout" section, the NOT_FOUND on Activity heartbeat section of request failures, and the RecordActivityTaskHeartbeat row of Cloud service health.

Notes to reviewers

Walk through where Heartbeats get delayed when Activities time out while
still working: confirming the timeout, ruling out a crashed Worker,
rejections by rate and persistence limits, Workflow lock contention, slow
writes, and late Worker sends. Give metric queries for each check, how to
lengthen the timeout on pending Activities, how to reduce Heartbeat load,
and what to alert on. Link to it from the encyclopedia, request failures,
and Cloud service health pages.
@Duncanma
Duncanma requested a review from a team as a code owner November 25, 2026 19:23
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
temporal-documentation Ready Ready Preview Nov 25, 2026 7:24pm UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📖 Docs PR preview links

This branch was successfully deployed

1 active deployment
Preview — 3be47412 Deployed Nov 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant