Liquibase parallel execution on multiple Microsoft Azure SQL Server DB

Hi Liquibase Team,

I am executing Liquibase through Microsoft Azure DevOps pipeline using Docker image 4.23.1. We are using liquibase free version. I have microsoft Azure SQL server as our database and using changelog format as SQL. We have multiple Azure SQL server DB and through ADO pipeline liquibase run’s the execution on multiple DB’s. I am having a bash script where I am passing List of Databases through parameters and in a for loop it run’s liquibase execution in parallel on multiple DB’s list provided. Below is the line in bash script where in loop, based on value provided it executes the liquibase update command.

nohup liquibase --defaultsFile=“./$DBFolderName/liquibase.properties” --url=“jdbc:sqlserver://$DBServerName:1433;database=$db;encrypt=true;” --username=$LiquibaseUserName --password=$LiquibasePassword --logLevel=info $LiquibaseCommand > “$LOG_FILE” 2>&1 &

In lower env’s (Testing and Staging) we have 14 DB’s where parallel execution of the changelog script’s is required ,With 14 DB the pipeline worked fine and parallel execution worked well in Testing and Staging env. In recent release we went in Prod env where total number of DB’s are in range of 200 to 210. In Prod env pipeline didn’t work and it got hang for long time without showing any logs.

We have tried to send the DB’s name list in set of 50, 40,30,20 but same problem pipeline was not working and got hang. When we sent 20 DB’s list, this time pipeline executed on some DB’s and some of them was having error as mentioned below in DB’s specific log files.
We have tried another run by sending list of 15 DB’s this time pipeline worked well without any connection error.

Error we are getting when trying to run more than 15 DB’s in parallel

Caused by: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: Connection could not be created to jdbc:sqlserver://liquibasedemo.database.windows.net:1433;database=test-service-liquibase
with driver com.microsoft.sqlserver.jdbc.SQLServerDriver. The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: “Connection reset by peer ClientConnectionId:b244deta-r529-46yt-b94y-bc8974i27p76”.

As we have more than 200 DB’s in Production and we are passing 15 DB’s set at one time so the overall pipeline execution time to execute on 200 DB’s is around 20-25 mins. In the lower env pipeline execution time in 3-4 mins

Can you Please help to resolve my below queries.

  1. Is there any limit on Liquibase free version that restricts Parallel execution on DB’s, Can you Please confirm if there is any limit.
  2. Can you confirm how we can resolve this issue related to Connection reset by peer. I have tried to used two different SQL JDBC driver version sqljdbc_12.2.0.0_enu and sqljdbc_12.4.1.0_enu but getting same connection error with both the drivers when trying to execute liquibase update on more than 15 DB’s in parallel.

Please help to resolve this issue.

For question #1, Liquibase OSS has no specific limits on parallel execution. I wonder if you’re hitting a connection limit on the Microsoft Azure SQL Server DB side.

For question #2, I believe a “Connection reset by peer” error is the database refusing connections, often because of a timeout or resource limitation on the server side.