Liquibase "Could not acquire change log lock" in CI
Liquibase takes a lock by setting the row in DATABASECHANGELOGLOCK before applying changes. If a prior run was killed (a cancelled job, a timeout), the lock stays set, so the next run waits and then fails to acquire it.
What this error means
liquibase update prints "Waiting for changelog lock...." repeatedly and then fails with "Could not acquire change log lock. Currently locked by <host> since <time>".
liquibase output
Waiting for changelog lock....
Liquibase: Could not acquire change log lock. Currently locked by 10.0.0.5 (10.0.0.5)
since 6/30/26, 9:14 AMCommon causes
A previous run was killed while holding the lock
A cancelled or timed-out CI job left the DATABASECHANGELOGLOCK row set, so the lock is never released.
Two migration runs overlap on the same database
Concurrent jobs target the same database and one holds the lock while the other waits.
How to fix it
Release the stale lock
When you are sure no run is active, release the lock and re-run update.
Terminal
liquibase releaseLocks
liquibase updateSerialize migrations on a database
- Ensure only one migration job runs against a given database at a time.
- For disposable CI databases, recreate the database instead of releasing locks.
- Add a timeout so a hung run does not hold the lock indefinitely.
How to prevent it
- Run one migration job per database; do not overlap them.
- Use fresh databases in CI so stale locks never carry over.
- Release the lock only when no migration is genuinely running.
Related guides
Liquibase "Validation Failed: checksum changed" in CIFix Liquibase "Validation Failed: ... computed checksum ... is different from the recorded checksum" in CI -…
Liquibase "Unexpected error running Liquibase" in CIFix "Unexpected error running Liquibase" in CI - the wrapper message that precedes the real cause, such as a…
Prisma P3009 "migrate found failed migrations" in CIFix Prisma P3009 "migrate found failed migrations in the target database" in CI - a previous prisma migrate d…