Skip to content

Worker troubleshooting ​

A worker that does not show up, work that is not picked up, and calls the server refuses. Start with two checks:

  • The console's Workers page: is the worker listed, with the queue you expect?
  • From the worker's host: curl -sS "$JOOBQ_GATEWAY_URL/api/v1/sdk/openapi.json" -o /dev/null -w '%{http_code}\n' must print 200.

The worker does not show on the Workers page ​

The worker logs, or the check printsCauseFix
A connection error, or a code other than 200The address is wrong, or the network or a proxy blocks itUse the server's public https:// origin, without a path
503 sdk_token_not_configuredThe server has no SDK tokenSave one in Settings → Security
401 sdk_token_requiredThe worker sends no token, or another oneGive it the same value, without a trailing newline
A certificate errorThe worker does not trust the server's certificateUse a certificate from a public CA, or add yours to the worker's trust store
Nothing, and the worker exitedIt failed at startRead the worker's own log

A worker retries quietly while the server cannot be reached (250 ms, doubling up to 5 seconds), so a wrong address shows as a worker that runs but never registers.

Is it a job or a workflow step? ​

The same symptom has different causes for the two kinds of work a worker does (Queue workers and workflow workers):

You seeQueue worker (jobs)Workflow worker (steps)
Work is not picked upNo worker serves the job's queue, or the queue is paused, capped or throttledNo worker serves the blueprint's task queue, or the server has no Pro key
Work failedLook at the Dead letters pageLook at the run on the Workflows page: the failed step and its error are in its history
Work ran twiceAt-least-once delivery after a lost leaseThe same, for one step. Finished steps are not repeated
Work did not run again after a crashThe job had no retries leftThe step declares no retries

503 sdk_token_not_configured, 401 sdk_token_required ​

The server has no SDK token (503), or the worker sends no token or a different one (401). Save one on the console's Settings → Security page (SDK gateway token; it applies within seconds), or set JOOBQUI_SDK_TOKEN (or JOOBQUI_SDK_TOKEN_FILE) on the server, and give the worker the same value, without a trailing newline. A token shorter than 32 characters is refused by the console and, set in the environment, stops a production server.

Jobs are not picked up ​

  • No worker serves that queue or job type: compare the job's queue and job_type with what the worker registers (the Workers page lists each worker's queues).
  • The queue is paused, or its concurrency limit is reached (Queues page).
  • The queue has a throttle: at most one claim per period / limit.
  • The worker cannot reach the server: from its host, curl -sS "$JOOBQ_GATEWAY_URL/api/v1/sdk/openapi.json" -o /dev/null -w '%{http_code}\n' must print 200. SDK workers retry quietly (250 ms, doubling up to 5 s).
  • A delayed job (delay_ms, run_at_ms) waits for its time.

A job or step failed with LeaseExpired ​

The worker holding it stopped renewing its lease: it was killed, it lost the network, or the process was blocked for longer than the lease (lease_ttl_ms, 30 s by default). The task was queued again with one retry used; a job with none left went to the dead letter queue. A workflow step runs again after a crash only if it declares retries.

A step timed out although its worker is alive ​

The step has heartbeat_ms and its handler did not call ctx.heartbeat() within it (the worker's own lease renewals do not count), or the worker runs an SDK release that does not beat. Call ctx.heartbeat() more often than heartbeat_ms, or raise it. timeout_ms limits one attempt (24 h by default) and schedule_to_start_ms the wait for a worker.

A run ended timed_out ​

The blueprint's timeout_ms (the whole run's deadline) passed. It is off by default.

422 on a blueprint (the worker logs a refused blueprint) ​

The gateway refused the blueprint and the worker does not send it again: a reference to an unknown or a later step, a duplicate node name, a query named state or steps, an after: naming an unknown step or making a cycle. 409 means another workflow already uses the name. Fix the definition and restart the worker. (A 5xx or network error is retried with the worker's registration.)

The dead letter queue keeps growing ​

Look at the error class and frames on the dead-letter page: a non-retryable error, an exhausted retry policy, or LeaseExpired (workers dying). Re-drive after the fix (POST /api/v1/dlq/redrive), and set JOOBQUI_DLQ_RETENTION_DAYS if old entries should go.

402 pro_required ​

The call needs a JoobQ Pro key and the server has none: workflows, rate limiting, Pro batches (create_batch, get_batch), the until_executing and until_executed unique modes, and workflow schedules. A batch call also answers it when the key's licence does not cover batches (the message says so). See Setup and licence.

422 batch_member_unique ​

A member of a Pro batch sets a unique_key. A deduplicated member would never finish, and neither would its batch, so the whole batch is refused and nothing is written. Leave unique_key off the members; a callback may not set one either, nor encrypt_fields, unique_mode, delay_ms or run_at_ms (those answer 422 invalid_request, naming the callback). See Batch enqueue and batches.

A batch stays pending ​

get_batch shows members still pending. A member counts once, when it completes or is dead-lettered; a retry is not an outcome. A member that is still waiting, delayed or retrying, or whose queue no worker serves, counts when it ends. A member deleted from its queue in the console never reports: the batch stays pending and on_complete never fires, so run the follow-up work yourself. A batch record is kept at least 30 days; an outcome after that is not counted (the server logs ... found no batch record ...). The operator runbook ("A Pro batch stays pending" in OPERATIONS.md) shows how to find the missing members in Redis.

Schedules do not fire ​

  • Job schedules are fired by the server. A paused schedule skips its ticks, which are not made up on resume. An entry that cannot run (bad pattern or zone) is listed with its problem on the Schedules page.
  • Workflow schedules fire only while a server runs the workflow scheduler (JOOBQUI_WORKFLOW_SCHEDULER=true). GET /api/v1/workflow-scheduler says whether one is alive.

Throughput is low ​

Check the Queues page first: a pause, a concurrency limit or a throttle caps a queue on purpose. Then raise concurrency, run more worker processes, and only then add server instances: see Scale workers.

A worker was killed during a deploy and its jobs ran twice ​

That is at-least-once delivery: a task whose outcome was not reported runs again when its lease expires. Stop workers with SIGTERM, give them longer than drain_timeout (30 seconds) before a kill, and make handlers safe to run twice: see Manage workers.