Search code examples
databaselockingvertica

Vertica DB throwing Unavailable: initiator locks for query - Locking failure: Timed out X locking


I am repeatedly getting this error while trying to run client application which runs query on vertica database table.

Can someone help to fix this issue ?


Solution

  • I wonder which kind of "queries" you client application sends to Vertica (SELECTs running in READ COMMITTED mode do not require locks).

    Anyhow... first step, check who/what is using your locks:

    select * from locks ;
    

    Then check the session_id from sessions.

    Now you can:

    Option 1: just wait

    Option 2 close the session: select close_session('<session_id>') ;

    Option 3 increase the lock timeout in configuration parameters

    Option 4 ... depends on what/why is using your locks ...