Skip to main content

Error: ERROR: could not obtain lock on relation

Issue with Data Locking in the Database (PostgreSQL)

Written by Petr Pech

This article applies only to on-premise (server / local) installations of ABRA Flexi.

This error means that a lock on a database table could not be obtained. Typically, the table is already being used by another process.


Most common causes:

  • unclosed or "hanging" connections on the server

  • concurrent operations on the same data (e.g. API calls)

  • long-running transactions


How to resolve the issue:

  • restart ABRA Flexi Server

  • if the issue recurs:

    • check your API integration (frequent or parallel requests)

    • limit concurrent operations on the same data


Recommendation:

  • use the server with the autoUpgrade setting enabled (helps prevent similar issues)

Did this answer your question?