Troubleshooting Temporal worker capacity

When Temporal queues back up, the cause is usually a chain of worker capacity failures rather than one bug. This page shows how to trace that chain and apply the matching fix.

On this page

Why Temporal worker capacity runs out and how to troubleshoot it

When workflows slow down or pile up in a task queue, the first job is to find which link in the worker chain failed, because the symptom looks the same whichever link broke. Temporal workers poll task queues for workflow and activity tasks, hold a limited number of task slots to run those tasks, and in the workflow case may rely on a workflow cache to avoid replaying full histories. One failing link can cascade: pollers stop or get starved, slots stay occupied by tasks that never finish, the backlog grows, and the cache loses the state it needed. This page works backward through that chain, from the slots and pollers that run work, to the backlog they leave behind, to the sticky cache that holds workflow state, and gives a fix for each link.

Read the chain in order. Start by confirming that the worker processes are alive and polling the expected task queue and namespace, since a stopped or misconfigured poller explains a backlog with no other errors. Next, check whether task slots are saturated, meaning every slot is busy and new tasks wait. Then compare the backlog trend with the cache behavior, because a worker that restarts or evicts cached workflows forces replay and can look like slow execution rather than a capacity problem. The Temporal documentation and the metrics your SDK exposes are the right references for the exact metric names, so confirm them against your SDK version before you write alerts.

No fixed thresholds appear here on purpose. The right slot counts, poller counts, cache sizes and backlog alert levels depend on your workload, activity duration, worker hardware and the Temporal Server version you run, so confirm them with your SDK documentation and by load testing in a non-production namespace. Before you change anything in production, record the current queue depth, slot usage and worker restarts so you can tell whether a fix worked. If your team does not yet have dashboards for these signals, that gap is the first thing to close, and DeployOpen can plan that work as part of a scoped engagement.

How a worker capacity failure spreads into a backlog

The failure usually starts on the worker side, when task slots fill and pollers stop taking new work. Tasks then wait in the task queue, and the sticky cache loses the workflow state that workers were holding, so the next workflow task has to replay history from the start. Before changing worker settings, check whether the Temporal Service itself is slow through persistence, visibility or the frontend, because those faults look the same from the worker side.

Worker capacity failure moving from exhausted slots to workflow task timeouts.

Working back from the backlog to the first failing link

This sequence moves from the symptom of a backed-up queue to the single component causing it, so the fix targets the right layer. Work through the steps in order and stop at the first check that fails.

  1. Confirm the affected namespace and task queue

    Start by identifying which namespace and task queue are backing up, and whether the backlog is on one queue or several. Someone with access to the Temporal Web UI or CLI should list the pending workflow and activity tasks for the affected queue and compare them with the queue that users report as slow. If only one queue is affected, the problem is likely in the worker fleet serving that queue. If several queues back up at once, look for a shared cause such as the Temporal Service or a shared database, and move to the final step early.

  2. Check whether workers are connected and polling

    Confirm that worker processes are running, connected to the frontend address for the right namespace, and polling the affected queue. Use the Web UI or CLI to view the task queue's poller list, and compare the count with the number of worker pods or processes you expect. If no pollers appear, the worker deployment, network path, TLS or namespace configuration is the first failing link, so check container status, startup logs and connection errors. If pollers are present but fewer than expected, move to the next step to see whether they are busy or have stopped.

  3. Read slot utilization and task latency

    Using the worker and SDK metrics exposed by your workers, check how many task slots are in use compared with the configured maximums, and how long tasks wait between being scheduled and being picked up. Full slots with high schedule-to-start latency point to a worker that is under capacity, so the fix is more slots, more workers or shorter task execution time. Low slot use with high latency suggests pollers are not reaching the queue, so return to the polling check. Confirm exact metric names in your SDK's documentation, since they differ between language SDKs.

  4. Separate workflow task backlog from activity task backlog

    Determine whether the backlog sits on workflow tasks or activity tasks, because the causes and fixes differ. A backlog of workflow tasks usually means workflow worker slots, replay cost or a non-deterministic or very large workflow history is slowing decisions. A backlog of activity tasks usually means activity workers lack slots, activities are slow to complete, or downstream systems are limiting throughput. Compare the workflow and activity schedule-to-start metrics for the queue, and note which one grows first. Use the result to choose the branch for the fix, and keep the other branch as a check after the change.

  5. Check sticky cache behavior after restarts

    If the backlog began after workers restarted or scaled, check whether sticky execution is working. After a restart, a worker has an empty workflow cache, so each workflow task must replay history, which is slower and can make slots look busy while throughput drops. Watch the cache hit and miss metrics, and the rate of replay work, for a period after the restart. A high miss rate that settles over time is expected, while one that stays high suggests cache size is too small for the number of active workflows, or workers are restarting too often. Confirm the cache setting names and metrics in your SDK's documentation.

  6. Check the health of the Temporal Service

    If workers look healthy but tasks still wait, check the Temporal Service itself. Review the service's own logs and metrics for errors, persistence latency, and the frontend and history service error rates, and confirm the persistence database is responding normally. Self-hosted operators should also check that service components are running at the expected counts after any recent upgrade. If the service shows errors or saturation, the failing link is the service or its database, and worker tuning will not clear the backlog. Confirm the metric names against the server documentation for your version.

  7. Record the first failing link and apply its fix

    Write down the first check that failed, along with the metric values and the time they were observed, and apply the fix that matches that layer: restore polling, add slots or workers, shorten task work, adjust cache size, or repair the Temporal Service or its database. Then rerun the checks in order to confirm that schedule-to-start latency falls and the backlog drains. The step is complete when the queue returns to its normal depth and the cause is recorded for the team's runbook.

Fixes for exhausted slots, stopped pollers and sticky cache misses

When a Temporal task queue backs up, the cause is usually one of a few links in the worker chain: slots run out, pollers stop, tasks pile up, or the sticky cache empties. These cards take each failure mode in turn, with the symptom to look for, the likely cause and the fix direction. Check the worker metrics first, because the same backlog can look identical from the queue side.

Exhausted task slots

Symptom: workers are busy, schedule-to-start latency climbs and the task queue backlog grows while CPU stays moderate. Likely cause: the worker's workflow or activity task slots are all occupied, so new tasks wait for a free slot. Long-running or blocked workflow and activity tasks often hold slots longer than expected. Fix direction: scale worker replicas first, then raise slot limits only within the limits your SDK documentation recommends for your memory and CPU. Confirm slot utilization in your SDK metrics before changing anything.

Pollers that stop or never connect

Symptom: a task queue shows no pollers, or the poller count drops after a deployment while tasks still arrive. Likely cause: worker processes crashed, failed to reach the Temporal frontend because of DNS, TLS or network policy, or were registered to a different namespace or task queue name. Fix direction: check worker logs for connection errors, confirm the namespace and task queue names match the client and worker configuration, and verify network paths from worker pods to the frontend service. Restart workers only after confirming the cause.

Self-hosted deployment docs

Growing task backlog

Symptom: the backlog of tasks on a queue keeps rising even though some workers are polling and processing. Likely cause: arrival rate exceeds processing capacity, or a subset of workers is slow, so throughput cannot match new work. A backlog can also follow a burst of workflow starts or a retry storm. Fix direction: compare task arrival and completion rates over time, scale the worker fleet that serves the queue, and review whether activities retry aggressively. Decide whether the backlog should drain on its own or needs intervention before a deadline.

Sticky cache misses after restarts

Symptom: latency spikes after a rolling restart or pod reschedule, and workflow tasks replay full histories instead of continuing from cached state. Likely cause: the sticky workflow cache is empty on newly started or reassigned workers, so each workflow task must rebuild state from event history. Cache misses spike when many workers restart together. Fix direction: roll workers gradually rather than all at once, use graceful shutdown so in-flight tasks finish, and size worker memory with the cache in mind. Track cache hit metrics from your SDK to confirm the cause.

Downstream pressure holding slots

Symptom: activity slots stay occupied for long periods, activity start-to-close timeouts appear, and the same queue slows whenever a dependency such as an API or database degrades. Likely cause: activities wait on a downstream service that is slow or down, so each activity holds its slot until it times out or retries. Retries multiply the load. Fix direction: review activity timeouts and retry policies against the real behavior of the dependency, consider pausing affected activities during an outage, and isolate slow activities onto their own task queue so they do not block other work.

Capacity levers and when each one fits

This table compares the levers operators adjust when a Temporal task queue backs up, from worker replicas and slot limits to sticky cache and server capacity. Read each row by the symptom it addresses, then check what it costs or risks before changing it. Most backlogs are fixed by matching worker-side limits to the work, not by adding capacity everywhere at once.

LeverSymptom it addressesWhat it costs or risksWhat to confirm in SDK or server docs
Worker replica countBacklog grows on one queue while worker CPU and memory have headroomMore pods to schedule and monitor, more connections to the Temporal Service, and possible overload of downstream systemsConfirm how each SDK recommends scaling workers and whether replicas share one task queue
Per-worker task slot limitsWorkers sit idle on the queue while tasks wait, or workers run out of slots and stop pollingToo high causes memory pressure and slow tasks; too low leaves capacity unusedConfirm the workflow and activity slot settings and their default values in your SDK version
Poller countsTasks are slow to be picked up even though slots are freeMore pollers add load on the frontend and can increase empty pollsConfirm the poller setting names and their minimum and maximum in your SDK
Task queue partitioningOne task queue is a bottleneck for a high-volume workflow typePartitions change how tasks are distributed and can complicate ordering expectationsConfirm partition support and any server settings that control partition counts for your Temporal Server version
Sticky cache sizingWorkflow tasks replay history repeatedly, raising latency and worker loadA larger cache uses more memory per worker and can hide a non-determinism or history growth problemConfirm the cache size setting, its unit, and how the SDK reports cache hit and miss metrics
Activity concurrency limitsActivities overwhelm a downstream API or database, causing retries and timeoutsLower limits slow throughput and can lengthen total workflow durationConfirm the max concurrent activity settings and whether they apply per worker or per queue
Temporal Service capacity (self-hosted)Frontend or history latency rises, and worker calls show deadline or unavailable errorsScaling services or the persistence store adds infrastructure, licensing review if using a managed database, and operational workConfirm service-level sizing and history shard guidance in the self-hosted scaling documentation for your version

Worker side or service side: where the bottleneck sits

When you self-host Temporal, you operate the service, so a backlog can come from the service as well as from your workers. Start by listing the components you run. Temporal Server runs as separate services (frontend, history, matching and worker), whether you deploy with Docker Compose, Go binaries or Helm charts. In Kubernetes, each of these services runs in its own pods, so a single unhealthy service can hold up task processing while the others look normal.

  • Service health: Confirm that the frontend, history, matching and worker services are running and healthy in every deployment before you suspect your application code.
  • Chart and image versions: Helm chart versions below 0.73.1 do not work with server images 1.30 and later, so check the chart version against the server image before you read any metric.
  • Persistence store: Temporal persistence is tested on Cassandra 3.11, 4.0 and 5.0.4 or later, PostgreSQL 13 to 16, and MySQL 5.7 and 8.0.19 or later. Slow database latency appears as slow task processing, so check database health alongside the service.
  • Visibility store: Advanced visibility supports Elasticsearch 7 and 8, OpenSearch 2 or later from Temporal Server 1.30.1, and SQL-based options as documented for your version. Cassandra visibility was removed in 1.24. Visibility lag can look like a stuck queue in tools that query it, so confirm which store your tooling reads.
  • Network boundary: Temporal services should run on hosts that are not reachable from the public internet. Confirm the network path between workers and the frontend before you debug connectivity.

Before you change any worker setting, confirm the server version, chart version and database latency so you know which layer you are actually diagnosing.

Changing worker capacity safely during an incident

Before you scale or restart workers in the middle of an incident, confirm who is allowed to change what. In a self-hosted Temporal Service, the default noopAuthorizer allows every API request with no authentication or access control unless you have configured an Authorizer. Check that the frontend has mTLS settings for internode and frontend traffic, that a ClaimMapper maps JWT or certificate claims to namespace roles, and that an Authorizer plugin is active before you change namespaces, worker identities or task queue settings. Confirm this during normal operations, not during the incident, because an emergency is the wrong time to discover that any client on the network can terminate or reset workflows. Temporal services should also run on hosts that are not reachable from the public internet, with network access limited to trusted internal networks, so that a worker certificate or token is not the only thing between an attacker and your namespaces.

Scaling or restarting workers changes which workers hold cached workflow state and which activities are in flight. Graceful shutdown lets a worker finish the tasks it has already accepted, but a forced kill or a rapid scale-in can leave activities half-complete. Sticky cache is lost when a worker restarts, so the next workflow task may replay the full history on a new worker, which slows recovery and adds load to the Temporal Service. Activities can also run more than once after a retry, so every activity you touch should be idempotent, meaning a repeated call with the same input produces the same outcome. Ask the owners of each activity which external side effects it performs and whether they deduplicate by a workflow or activity identifier before you change capacity.

Treat server versions as a separate change with its own gate. Temporal Server should be upgraded one minor version at a time, moving to the latest patch of the current minor first, because backward compatibility is guaranteed only between two successive minor versions. When the release notes call for a schema upgrade, run it before the server upgrade. Do not combine a server upgrade with a worker scaling change during an incident. Record the current server version, Helm chart version and worker build before you start, and confirm the change plan against the Temporal upgrade documentation. If an upgrade is the fix, plan it as a separate, reviewed change rather than an emergency action.

Temporal worker capacity limits to confirm in your environment

Worker capacity failures rarely have one cause. Slot counts, poller counts, sticky cache behavior, emitted metrics, autoscaling and backend load all interact, so each setting below should be confirmed against your SDK version and your own load tests before you set an alert or a fix. Treat the items as a checklist to work through in order.

Default slot and poller settings

Workflow and activity task slots limit how many tasks a worker runs at once, and pollers limit how many long-poll requests it keeps open against a task queue. Defaults differ by SDK and version, so an exhausted slot pool may come from a default you never changed. Confirm the defaults for your SDK version in its worker tuning documentation, then record the values your workers actually start with, including any set through environment variables or configuration files.

Self-hosted deployment docs

Sticky cache size and eviction

Sticky execution keeps a workflow on the worker that already holds its state in memory, which avoids replaying history on every task. When the cache is small or evicts aggressively, workers replay more and slots stay busy longer, which looks like a capacity problem. Confirm how your SDK and language sizes the cache, whether the limit is by entries or by memory, and what happens to the sticky queue when a worker restarts.

Metrics your SDK emits

Queue backlog, schedule-to-start latency, slot usage and poll success rates tell you where the chain breaks, but metric names and labels vary by SDK. Confirm which metrics your SDK exports, how the exporter is enabled, and whether the server-side metrics for task queue backlog are scraped alongside them. Without that mapping, a dashboard can show a backlog that no worker metric explains.

Alert thresholds for your workload

A fixed threshold copied from a blog post will either page constantly or miss a backlog that matters to your business. Set thresholds from your own load test, using the normal schedule-to-start latency and task queue depth for your peak hour, and alert on sustained trends rather than single samples. Document who responds, and what action each threshold triggers, so the alert leads to a runbook step rather than a guess.

Autoscaling support on your platform

Scaling workers on backlog or latency needs a scaler that can read Temporal metrics, and Kubernetes, serverless and VM platforms each handle this differently. Scaling down during a drain can also stop pollers mid-task if shutdown is not configured. Confirm which scaler your platform supports, which metric it reads, and how long pods take to finish in-flight tasks before termination.

Persistence and visibility headroom

A worker that is slow to record history or answer visibility queries can look like an idle worker with a growing backlog. Confirm the supported versions of your persistence store and visibility backend in the persistence and visibility docs, then load test with realistic write and query rates to find the point where database latency starts to hold up task completion. Ask your database team for their connection and IOPS limits as part of the same test.

Persistence docs

Questions teams ask before bringing in outside help

Can our team troubleshoot Temporal worker capacity without outside help?

Yes, many teams can, provided they have someone who understands their workflow code, their worker deployment and the metrics their workers emit. The work is a chain of checks: confirm whether activity or workflow task slots are exhausted, whether pollers are still connected to each task queue, whether a backlog is growing, and whether sticky cache eviction is causing workers to replay history. Teams with an experienced Temporal engineer, clear worker metrics and a staging environment that reproduces their load usually resolve these issues in house. Teams that lack those three things often spend their time guessing at the cause, which is where an outside review tends to pay off.

What drives the effort of a Temporal worker capacity review?

Effort rises with the number of task queues, the mix of SDKs in use, and whether the service is self-hosted or runs on Temporal Cloud. Each task queue has its own pollers, slot limits and backlog, so more queues mean more places a failure can hide. A mix of SDKs, or workers written in several languages, adds separate tuning and metric definitions. Self-hosted deployments add the server side to the investigation, including the persistence and visibility stores described in Temporal's documentation, while Temporal Cloud shifts some of that work to the provider. Observability maturity matters most of all: a team with per-queue dashboards and alerts gives the reviewer a clear starting point, while a team without them needs instrumentation work before tuning can begin.

How long does a worker capacity engagement take?

Duration depends on scope: the number of task queues and workers in question, whether the fix is limited to configuration or also needs code changes, and how quickly the required access and load data arrive. A single queue with good metrics and a reproducible symptom is a small scope. A multi-queue, multi-SDK estate with intermittent backlogs and no load tests is a larger scope, because each hypothesis needs a controlled test. We do not state a duration here because none has been researched for this topic. Ask for a written timeline tied to the agreed scope, and ask which parts depend on your change windows.

What must our team provide before a worker capacity review starts?

The review needs four things from your side. First, access to the Temporal namespace, worker deployment configuration and, for self-hosted setups, the server metrics and logs. Second, worker metrics covering slot usage, poller counts, task backlog and cache behavior per task queue, over a period that includes a slow day. Third, a description of load patterns, including peak times, batch jobs and retry storms. Fourth, a list of change windows in which configuration can be changed or tests can run against production-like workers. Missing any of these usually extends the work, because the reviewer must either wait for data or work from assumptions.

Do worker capacity fixes always require workflow code changes?

No. Many capacity problems are fixed by worker configuration, such as slot limits, poller counts, the number of worker replicas, task queue partitioning and sticky cache sizing, along with the deployment settings that control how workers shut down. Code changes become necessary when a workflow or activity holds a slot for too long, when a long-running activity blocks other work, or when payloads are large enough to slow workers. Any change to workflow code that alters the command sequence must also be handled under Temporal's determinism rules, so a fix that touches workflow logic needs versioning and a replay test before release. The review should state which fixes are configuration only and which need a code change.

What does a fixed-scope Temporal worker capacity engagement cover?

A fixed-scope engagement covers the agreed task queues, workers and environments, and it sets out the deliverables and timeline in writing before work starts. Typical deliverables for this topic include a diagnosis of the failure chain for each queue in scope, the configuration or code changes recommended for each finding, a test plan that reproduces the symptom, and a set of metrics and alerts that show whether the fix holds. Work outside the agreed scope, such as a server upgrade or a new task queue design, is quoted separately. Ongoing tuning, load testing and retesting after upgrades can be arranged as a retainer.

Which costs recur after a worker capacity fix is delivered?

The one-time cost is the diagnosis and fix. Recurring costs come from the infrastructure that runs the workers, the metrics and alerting stack that watches them, and the people who respond when capacity alerts fire. If you run self-hosted Temporal, the server and its persistence store also carry recurring operating costs. If you use Temporal Cloud, its pay-as-you-go pricing is based on actions and storage, and the Temporal pricing page lists the current rates and support tiers. Ask any partner to separate one-time work from retainers, and to state which worker or infrastructure costs stay with your team.

How DeployOpen scopes and supports Temporal worker capacity work

DeployOpen approaches worker capacity as a scoped engagement: we first confirm which workers, task queues and metrics are in play, then fix the failure chain in your own infrastructure and hand over a runbook your team can use. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.

How we scope

  • We confirm which namespaces, task queues and worker deployments the written scope covers.
  • We agree which metrics and worker logs are available and who can access them during the work.
  • We record the Temporal Server version, persistence and visibility stores so fixes match your deployment.

How we build

  • We tune worker slot limits, poller counts and sticky cache settings against your measured workload.
  • We test each fix in a non-production environment that matches your task queue layout before rollout.
  • We add alerts on schedule-to-start latency and task backlog so capacity problems surface early.

How we hand over

  • We deliver a runbook that walks operators through each failure step, its symptom and its fix.
  • We document configuration changes, the reasoning behind each value and the rollback path.
  • We walk your platform and on-call engineers through the runbook and the dashboards it relies on.

How we support

  • Ongoing support, upgrades and continuous testing are available as retainers after the handover.
  • Retainers can cover retesting worker settings after Temporal Server upgrades or new workload launches.
  • Any support scope is agreed in writing, and a quote follows from that written scope.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.