I have a maven spring project using liquibase. At the moment we have multiple instances deploying but sometimes the deployment will fail because the lock will last more than five minutes, due to the size of the changes.
How can I change the changlog wait lock time? I'm using the liquibase maven plugin, for which I didn't find obvious ways to configure this parameter, but I know that a command parameter exists: https://docs.liquibase.com/parameters/command-parameters.html
The documentation for changelog-lock-wait-time-in-minutes says that you can also set this parameter via liquibase.properties
file:
liquibase.changelogLockWaitTimeInMinutes: <int>
Or via Java system property:
Mac/Linux syntax:
JAVA_OPTS=-Dliquibase.changelogLockWaitTimeInMinutes=<int>
Windows syntax:
set JAVA_OPTS=-Dliquibase.changelogLockWaitTimeInMinutes=<int>
For liquibase.properties
configuration example with liquibase-maven-plugin check out this Baeldung article
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.4.1</version>
</dependency>
...
<plugins>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.4.1</version>
<configuration>
<propertyFile>src/main/resources/liquibase.properties</propertyFile>
</configuration>
</plugin>
</plugins>