# X_LOCK_LOST

## Means

a lock withLock held expired before its work finished

## Typical cause

a renewal was refused or did not land within ttl:, so another holder may hold the key now; the signal handed to fn aborted

## Fix

`withLock(key, fn, { ttl: '2m' })` — in the calling file: a ttl: longer than one renewal round-trip, and fn passes lock.signal to every write

[Jobs](/error-codes#jobs)
