L72: Canceling statement due to lock timeout
SQLSTATE: 55P03 (Class 55 - Object Not In Prerequisite State: lock_not_available)
Example Postgres Log Output:
ERROR: canceling statement due to lock timeout CONTEXT: while updating tuple (24,41) in relation "mytable" STATEMENT: UPDATE mytable SET y = 2 WHERE x = 1
This log event only occurs when
lock_timeout was enabled for the connection,
and the statement had to wait longer than the specified time for a lock.
Note that you won't see this message if
statement_timeout is smaller than
lock_timeout, as lock acquisition time is already included in the statement
It is not recommended to set this timeout for everything, instead only setting
it for specific connections (e.g. by configuring it for a specific role that
is used by web servers). Most of the time you will find
more useful, unless you are exhibiting a lot of locking problems and have
experimented with this setting before.
This points to a lock contention issue on your database, or another unexpected locking situation.
log_lock_waits is enabled,
L71 - Process still waiting for lock on tuple / relation / object
can give more details on which processes are holding the requested lock.
No additional resources available.
Couldn't find what you were looking for or want to talk about something specific?
Start a conversation with us →