Error 503 after start. ("Waiting for changelog lock..." at logs)

Created by Nick Panko, Modified on Tue, 04 Apr 2023 at 09:43 AM by Nick Panko

This is related to a database lock. Service cannot get the access to the database.


You can see logs by running:


docker-compose logs -f


Cause: this issue can be caused by unexpected service restart due to infrastructure or severe network malfunction. 


Solution: Follow the steps described below:
You can see all the services by running:

docker-compose ps


1. Stop all services that are not DB related, e.g. :

docker-compose stop allure-gateway allure-uaa allure-report


2. Now we need to find out the ID of the container where our desired base is located:

docker ps

3. Now we can access to database: 
(psql -h <host> -U <user> <database>)

docker exec -it <containder id> psql -h 127.0.0.1 -U report report


4. Get the content of the table containing locks data:

select * from databasechangeloglock;

5. Delete the lock preventing a service to start:

update databasechangeloglock set locked=false, lockgranted=null, lockedby=null where id=1;


6.Start the services stopped on the step #1.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article