Fixing high Temporal schedule-to-start latency

Schedule-to-start latency shows how long a task waits in a queue before a worker picks it up. This page explains how to separate worker capacity problems from poller, slot and backlog problems, and how to confirm the fix.

On this page

Why Temporal schedule-to-start latency climbs and how to diagnose it

Schedule-to-start latency is the time a task waits in a task queue between being scheduled and being picked up by a worker. It applies to both workflow tasks, which carry workflow code forward, and activity tasks, which run your side-effecting work. Workflows and activities can still complete correctly while this number climbs, because the work is only delayed, not failed. That is why the metric is a symptom rather than a cause. A rising value tells you that tasks are queuing somewhere, but not whether the queue is short on workers, short on free slots, polling too little, or simply receiving more tasks than the workers can drain. Start by deciding which task type shows the wait, since workflow task and activity task latency usually point to different fixes.

The four candidate causes leave different traces. Too few workers or too few pollers means tasks are queued while worker processes sit idle or are absent, so check the number of active pollers per task queue before adding capacity. Exhausted worker slots means the workers are polling but have no free execution slots, which shows up as high slot utilization and a backlog that clears only when load drops. Poller settings, such as the number of pollers per worker, can cap throughput even when workers and slots look healthy. A backlogged task queue means the arrival rate has outrun processing, and the backlog size and the age of the oldest task rise together. Confirm the exact metric and tag names for the Temporal Service and for Temporal Cloud in your own environment, since the two expose task queue behavior differently and names change between releases.

A practical first pass is to split the latency by task queue, task type and worker deployment, then compare it with pollers, slot usage and backlog for the same window. Record which change, such as a deploy, a traffic spike or a scaling event, lines up with the first rise. Before changing settings, confirm that worker processes are reachable and running the expected build, because a stale or partially rolled out deployment can look like a capacity problem. Decide in advance who owns worker capacity, who can change poller and slot settings, and what evidence will justify adding workers versus tuning. Load testing, not guesswork, should guide the final numbers.

Which of the four causes is most likely in your cluster

Schedule-to-start latency measures the time a task waits in a task queue before a worker picks it up. The four causes below all show up as that wait, so the pattern of the wait, and which queues and workers it touches, tells you where to look first.

Too few workers for the task rate

The worker fleet cannot keep up with the steady rate of tasks arriving on the queue, so every task waits a little longer than the last. The symptom is latency that climbs with load across the whole queue while worker CPU and memory are busy and no slot or poller limit is hit. Start by comparing task arrival rate against the number of running workers on the queue over the same window, and check whether scaling the worker count moves the latency. Confirm the metrics names and dashboards in your own Temporal metrics setup.

Self-hosted deployment docs

Worker slots exhausted by blocked tasks

Each worker has a fixed number of task slots, and long-running or blocked activities and workflow tasks can hold every slot while new tasks queue behind them. The symptom is latency that appears in bursts on specific workers, with slot usage pinned at its maximum even when total throughput looks low. Check whether slot saturation is reported for the affected workers, then look for activities that call slow external services or wait on locks without timeouts. Shorter timeouts and separate task queues for slow work are the usual fixes to evaluate.

Poller counts too low for throughput

Pollers are the long-poll requests a worker keeps open to fetch tasks, and too few of them can leave available slots idle while tasks wait on the queue. The symptom is free slots on the worker alongside a growing queue, with worker CPU well below capacity. Compare the configured poller count for workflow and activity task queues against the expected throughput, and check whether the latency falls after raising pollers in a test environment. Confirm the poller option names for your SDK version before changing them.

Backlogged queue from a burst or stalled fleet

A large batch of starts, a retry storm or a worker fleet that has stopped polling can leave a task queue with a backlog that takes time to drain even after capacity returns. The symptom is a sharp latency spike that starts at a specific time, with backlog size growing while the workers that should be polling show no activity or restarts. Check the start time of the spike against deployments, batch jobs and worker health events, and confirm that all expected workers are connected to the queue. Once the cause is clear, decide whether to add capacity or pause the source of the burst.

How to tell worker, slot and poller problems apart

When only workflow task schedule-to-start latency is high, the delay usually sits with the workers that run workflow code, not with the activity fleet. Workflow tasks are short but frequent, so a small number of workflow workers or a workflow task queue with too few pollers can build a queue while activity work keeps moving. Compare the following signals over the same window:

  • Workflow worker count over time: check whether the number of connected workflow workers dropped, flapped or never matched the planned replica count.
  • Workflow task slot utilization: sustained near-full slot use on workflow workers points to too few slots or long-running workflow code blocking the worker.
  • Poll success on the workflow queue: poll requests that return empty or fail often indicate connectivity, authorization or poller configuration issues.
  • Backlog size and task add rate on the workflow queue: a backlog that grows while the add rate stays steady means processing is slower than arrival.

Confirm the exact metric names for your Temporal Server version in the Temporal metrics documentation before building alerts on them.

Where a task waits between scheduling and pickup

The wait starts when the Temporal Service adds a workflow or activity task to a task queue, and the matching layer holds it until a poller asks for work. Workers poll with a configured number of pollers, and a task only starts once a worker has a free slot to reserve for execution. Check each hand-off in order: whether pollers are present, whether slots are exhausted, whether poller settings limit throughput, and whether the queue backlog is growing.

Where schedule-to-start time accumulates, from task queue to worker slot.

Triage sequence to isolate the bottleneck

This sequence separates a slow task pickup caused by worker capacity, poller settings or the Temporal Service from delays that only look like scheduling latency. Each step ends with a check that decides whether to continue or change direction.

  1. Confirm the delay sits in the task queue

    Start by comparing schedule-to-start latency with start-to-close time for the slow workflow tasks and activities. Your engineer pulls both from the Temporal Web UI or your metrics dashboards for the same window. If start-to-close time is high, the delay is inside workflow or activity code, and the queue is not the problem. Continue only when the gap between scheduling and starting is the dominant component. Record the affected task queue names and namespace so later steps compare the same traffic.

  2. Compare queue backlog against worker count

    Check the backlog size and oldest task age for each affected task queue, then count the workers that actually poll it. Your platform engineer should confirm that the workers connect to the expected namespace and task queue, because a worker on a misspelled queue name shows up as idle capacity. A growing backlog with few pollers points to too few workers. A backlog with many pollers points to the next steps. Write down the poller count and the backlog trend before changing anything.

  3. Check worker slot and poller saturation

    On each worker, review the SDK metrics for task slots in use, poller counts and sticky cache behavior, then compare them with the configured maximum concurrency. Saturated slots mean workers have no capacity to accept new tasks, even when hosts have spare CPU. Empty pollers that wait for work while the backlog grows suggest poller settings are limiting throughput. Your team is done with this step when they can state whether slots, pollers or neither are saturated for each queue.

  4. Inspect host resources and worker placement

    Verify that the worker hosts or pods are not limited by CPU, memory, network or connection limits that would prevent them from processing tasks even with free slots. Check whether workers are spread across the expected availability zones and whether any pods were recently restarted or evicted. Your platform team should confirm that deployment changes did not reduce the number of running workers. The output is a short list of resource or placement limits, or confirmation that none apply.

  5. Check the Temporal Service for matching pressure

    Review the Temporal Service side of the path: matching service latency, task queue partition metrics and any throttling reported for the namespace. Your operator should confirm that the frontend and matching services are not the bottleneck, using the metrics your deployment exposes. If matching shows pressure on a single task queue, consider whether that queue needs more partitions, which your team should verify against the Temporal documentation for your server version before changing it. The check is complete when the service-side metrics either clear the cluster or identify a specific queue to investigate.

  6. Change one setting and re-measure

    Change a single variable, such as worker count, maximum concurrent task slots or a poller setting, and leave everything else fixed. Your engineer then measures schedule-to-start latency and backlog for a comparable traffic window. Test each change in a non-production namespace first, using realistic task volume, and promote it only after the measured result improves. If latency does not move, revert the change before testing the next one. The step closes when the result is recorded alongside the setting that produced it.

Tuning pollers, slots and worker counts without shifting the bottleneck

Raising poller count, slot limits and worker replicas all increase how many tasks a fleet can take from a task queue, which is exactly why each change can move the bottleneck instead of removing it. A poller is a long-poll request from a worker to the Temporal Service asking for tasks, a slot is permission to run one task at once, and a replica is a whole worker process with its own connections and memory. Before changing any of them, confirm the exact names and defaults for your SDK and version, since the poller and slot settings differ between the Go, Java, Python, TypeScript and .NET SDKs. Write down the current values, the replica count and the host sizes so you can roll back cleanly.

Adding replicas usually spreads work across more machines and more connections to the frontend and matching services, which is the safer direction when the bottleneck is CPU or slots on existing workers. Adding pollers per worker increases concurrent calls into the Temporal Service, so the pressure lands on matching and frontend capacity and on any database those services query. Oversized slot limits are the other common trap: each slot can hold a workflow or activity task in memory, so a high limit on a small host can cause memory pressure, garbage collection pauses or CPU contention that slow every task on that worker, and the latency then looks like a service problem. A useful rule for planning is to raise one dimension at a time and stop when worker host CPU and memory, not the Temporal Service, become the limit.

Verify each change against two signals at the same time: task queue backlog, meaning the number of tasks waiting for a poller, and service-side latency for the frontend, matching and history services as exposed by the Temporal Server metrics you have enabled. A falling backlog with rising service latency means the bottleneck has moved, and a flat backlog with idle worker slots points to something other than capacity, such as poller settings or slow activity code. Run the same test load before and after each change, record worker CPU, memory and slot utilization alongside those metrics, and keep a change only when schedule-to-start latency drops without pushing service latency past the levels you set as acceptable.

Remediation options and when each fits

This table compares the main fixes for high schedule-to-start latency, from adding worker capacity to repairing a stalled fleet. Read each row against the backlog and slot signals you measured first, because a fix that targets the wrong bottleneck adds cost without moving pickup time. The main takeaway is that more workers help only when slots or pollers are the constraint, and the verification step is what proves the chosen fix worked.

OptionWhen it fitsCost or riskVerify afterward
Add worker replicasSlots are saturated on every worker and the task queue backlog keeps growing under normal loadAdds compute and may shift load onto the database or frontend if workers poll harder; scaling gains flatten when a single bottleneck remainsSchedule-to-start latency and backlog trend down across all workers, and the database and frontend show no new saturation
Raise slot or poller limitsWorkers have idle CPU and memory but tasks wait because concurrent task or poller settings are lowHigher limits raise memory use and concurrent load on each worker; too many pollers can add load without faster pickupSlot utilization and poller counts match the planned values, and task latency stays stable at peak
Split a busy task queueOne queue mixes high-volume short tasks with work that has a different owner or rate, so fast tasks wait behind othersRequires routing changes in workflow code and new worker deployments; in-flight work on the old queue must drain firstEach queue's backlog and schedule-to-start metrics are tracked separately, and routing sends the intended tasks to the new queue
Move slow activities to their own queueLong-running or blocking activities hold slots that short activities need, so quick work waits for slow work to finishNeeds a dedicated worker pool with its own sizing and deployment; more queues to monitor and alert onShort-activity schedule-to-start drops while long-activity duration is unchanged, and the dedicated pool has spare slots at peak
Repair a stalled worker fleetPollers are connected but tasks are not picked up, or a deployment left workers on an old build, a crash loop or mismatched task queue namesInvestigation time before any capacity change; a rollback or restart can interrupt in-flight activities if not plannedEvery expected worker is polling the right task queue and namespace, and the backlog clears after the fix
Fix workflow and activity code pathsWorkflows issue bursts of tasks that the worker cannot absorb, or retries flood the queue after a dependency failsCode changes need testing and versioning; risk of behavior change in running executionsTask arrival rate and retry counts return to expected levels, and no new non-determinism or versioning errors appear

Service-side limits that can look like worker problems

Before changing worker settings, rule out the Temporal Service itself. Pickup delay can start in the frontend, history, matching or persistence layers, or in a namespace rate limit, and each leaves a different trace in metrics. Work through these five in the order they sit on the task path.

Frontend service load

The saturated frontend is the entry point for every poll and task completion, so it can answer workers slowly even when queues are nearly empty. Check frontend request latency and CPU alongside the poll request rate for the affected task queue during the slow window. If frontend instances sit at their limits, add frontend capacity before changing worker settings. The sibling page on scaling Temporal Server services covers how to size the change.

History service load

History services own workflow state and create the tasks that matching later hands to workers. When history is overloaded, those tasks reach matching late, so workers look idle while they are polling correctly. Check history request latency and the gap between a workflow event being recorded and its task becoming available. Compare the history service count and shard distribution with the load you measured.

Matching capacity per task queue

Matching hosts the task queues that workers poll, and each queue is split into partitions. A single hot queue can concentrate its load on one matching host, which shows as backlog on that queue while others stay fast. Check the backlog and add and poll rates for each partition of the affected queue. Confirm that the partition count and matching host health match the throughput the queue must carry.

Persistence store latency

Every task and workflow state change is written to the persistence store, so database round trips set a floor on how fast tasks can move. Slow writes on Cassandra, PostgreSQL or MySQL lengthen the time between a task being created and a worker receiving it. Check database write latency, connection pool saturation and lock waits during the slow window. The persistence documentation lists the tested versions for each engine, so confirm your engine version is on that list.

PostgreSQL versions tested
13 to 16
Persistence docs

Namespace rate limits

Temporal applies request rate limits per namespace, so one busy namespace can have its polls and starts throttled while other namespaces run normally. Throttling appears as delay confined to the namespace under pressure, which is a useful signal. Compare that namespace's request rate with its configured limits, and check whether the delay disappears when other namespaces are quiet. The sibling page on rate limits covers the defaults and tuning.

Common questions about fixing schedule-to-start latency

How much effort does diagnosing schedule-to-start latency take?

The effort depends mostly on how much of the investigation is already covered by metrics and how many task queues are involved. A team with per-task-queue latency dashboards, worker metrics and recent deployment history can narrow the cause quickly. A team that has to instrument workers, reproduce load and separate frontend, matching and worker behavior takes longer. Other drivers include the number of namespaces, whether workers run on Kubernetes with autoscaling, how many SDK languages are in use, and whether the latency appears only at peak load or all the time. Ask any partner to list which data it needs before work starts, how many task queues it expects to examine, and which environments it will test in. Those answers set the work, and the quote should follow from them.

Does adding more Temporal workers always fix slow task pickup?

No. More workers help only when the bottleneck is worker capacity. Schedule-to-start latency can also rise when worker slots are exhausted by long-running activities, when pollers are configured too narrowly for the task queue, when a task queue backlog is growing faster than it drains, or when the server side is saturated. Adding workers to a queue with a server or database bottleneck can increase load on the same constraint and make results harder to read. The useful first check is whether tasks wait while workers have free slots, or whether workers are already fully busy. Confirm this with worker-side metrics before scaling, and record the change so the result can be compared against a baseline.

What access does the team need to provide for this work?

The work usually needs read access to the metrics that show task queue latency, backlog and worker health, plus the Temporal Service metrics that the server exposes. It also needs access to the worker code and its configuration, including worker options such as poller counts, slot limits and the task queue names each worker polls. Deployment manifests or Helm values, recent release history and logs from the workers are also useful. A separate test namespace is important when changes need to be verified without touching production traffic. Ask the team to confirm which of these exist today, who controls each, and how changes move from a test environment to production. Access requests should be agreed in the written scope.

Can an internal platform team diagnose this without outside help?

Often yes, if the team already runs Temporal workers and has working metrics. The skills needed are familiarity with the SDK worker options, the Temporal metrics for schedule-to-start latency and task queue backlog, and the ability to change and redeploy worker code safely. Teams with limited Temporal operations experience, or with no test namespace, usually find the verification step slow. An internal team also has to weigh the time it spends against its other work. A useful self-assessment is whether the team can explain, from its own dashboards, which task queue is slow, which workers serve it, and what changed before the latency started. If those answers are missing, outside help may shorten the investigation.

What does a partner's scope for this work usually include?

A written scope usually covers an agreed set of task queues and namespaces, a review of the metrics and worker configuration, a diagnosis of the cause, and a set of changes with a verification plan. It may also cover load reproduction in a test namespace, documentation of the tuned settings, and a handover so the internal team can monitor the result. Items that are often excluded or priced separately include server capacity changes, database work, changes to application code outside the workers, and ongoing monitoring after handover. Ask the partner to list in-scope and out-of-scope items, the deliverables, the access it needs, and the conditions for closing the work.

What cost components should a quote for this work show?

A quote should separate the one-time diagnosis and tuning work from any recurring support. The one-time part covers reviewing metrics and configuration, reproducing the problem, changing worker settings, and documenting the outcome. Recurring costs appear only if the buyer wants monitoring, periodic review or retainer support. Cost rises with the number of task queues, the number of worker languages and deployment targets, the need for a test environment, and any server or database work that the diagnosis reveals. Ask for each component to be priced or sized separately, and ask which items depend on a later decision so you can plan the budget.

Which metrics show whether the fix worked?

The fix is confirmed when schedule-to-start latency for the affected task queues falls back to an acceptable range under the same load that caused the problem. Check the task queue latency and backlog metrics, worker slot utilization, poll success and error rates, and the server-side metrics for the frontend and matching services. Compare results across a time window that includes peak load, not only a quiet period. Record the thresholds you agreed before the change, and confirm them with your own service owners, since acceptable latency depends on the workflow. Keep the dashboards in place after the change so a regression is visible.

How DeployOpen scopes and delivers Temporal performance fixes

DeployOpen approaches schedule-to-start latency as a measured problem: we start from the task queue, worker and cluster data your team already collects, then agree a written scope before changing any settings. The work runs inside your own infrastructure, so every tuning change is reviewed, tested and documented by your team as well as ours.

How we scope

  • Agree in writing which task queues, workers and namespaces are in scope for the latency investigation.
  • Collect schedule-to-start, worker, slot and backlog metrics from your current environment before proposing changes.
  • Define which fixes are covered, such as worker counts, poller settings or task queue partitioning, and which need a separate engagement.

How we build

  • Change worker counts, slot limits and poller settings one at a time in a staging environment that matches production load.
  • Replay representative workload against the tuned configuration and compare schedule-to-start latency before and after each change.
  • Record each configuration value, the reason for it and the test result so your team can reproduce or reverse it.

How we hand over

  • Deliver a written findings report that separates confirmed causes from likely causes still needing confirmation.
  • Provide runbooks for the alerts, dashboards and worker settings your operators will watch after the fix.
  • Walk your platform and on-call engineers through the tuning decisions and the limits where further scaling needs review.

How we support

  • Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts.
  • Ongoing support, upgrades and continuous testing are available as a retainer if latency needs regular review.
  • Ask any partner to confirm how they will test changes in your environment before anything reaches production.

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.