# DEFAULT_IMQ_DRAIN_TIMEOUT variable · @imqueue/job

Source: https://imqueue.org/api/job/latest/job.default_imq_drain_timeout/
Published: 2026-08-31
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/job 3.3.0 — generated reference, not hand-written

Default drain budget in milliseconds, used when neither [JobQueueOptions.drainTimeout](https://imqueue.org/api/job/latest/job.jobqueueoptions.draintimeout/) nor `IMQ_DRAIN_TIMEOUT` is set.

**Signature:**

```typescript
DEFAULT_IMQ_DRAIN_TIMEOUT = 4000
```

## Remarks

Sized against the `imq stop` CLI rather than a cluster: it signals the process group, polls liveness for about five seconds, then sends `SIGKILL`. A budget above that would let the local CLI kill a draining worker harder than Kubernetes would, whose `terminationGracePeriodSeconds` defaults to 30 s. 4000 leaves roughly a second for the re-queue, `destroy()` and process teardown.

Job handlers are often longer-running than RPC calls, so this is the number most worth raising — see [JobQueueOptions.drainTimeout](https://imqueue.org/api/job/latest/job.jobqueueoptions.draintimeout/).

