Skip to main content

Interface: SessionLockOptions

Defined in: packages/persistence/src/session-lock.ts:36

Optional behaviour of a SessionLock that is not declared configuration.

Properties​

applicationName?​

readonly optional applicationName?: string

Defined in: packages/persistence/src/session-lock.ts:41

Shown in pg_stat_activity, where a session that sits holding or waiting for a lock should be easy to tell from a leak. Default oktoid:<role>:session-lock.


connectionTimeoutMs?​

readonly optional connectionTimeoutMs?: number

Defined in: packages/persistence/src/session-lock.ts:43

Milliseconds to wait for the connection to open. Default 5000.


releaseTimeoutMs?​

readonly optional releaseTimeoutMs?: number

Defined in: packages/persistence/src/session-lock.ts:50

Milliseconds the release waits for the server to answer the unlock. Default 5000. Taking the lock waits without limit; giving it back must not, because a connection that went silent would otherwise hold its caller for ever. A release that times out is reported as lost and the connection is dropped.