# SHUTDOWN_TIMEOUT variable · @imqueue/pg-pubsub

Source: https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.shutdown_timeout/
Published: 2026-08-01
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/pg-pubsub 3.0.5 — generated reference, not hand-written

How long, in milliseconds, [PgPubSub.destroy()](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.pgpubsub.destroy/) waits for a graceful shutdown before giving up. Read from `PG_PUBSUB_SHUTDOWN_TIMEOUT`, default 1000.

The wait matters because releasing a lock cleanly is what lets a standby take over immediately: the release deletes the lock row, which fires a NOTIFY the waiting processes are listening for. A shutdown that is killed before the release completes falls back to [ACQUIRE\_INTERVAL](https://imqueue.org/api/pg-pubsub/latest/pg-pubsub.acquire_interval/) instead.

**Signature:**

```typescript
SHUTDOWN_TIMEOUT: number
```

