I am new to liquibase and is needed to know whether liquibase 3.5.x using oracle 12 c and ojdbc7 have a default timeout when executing any changeset. I have tried executing very delayed changesets which execute up to 24 hours and liquibase still doesn't timeout even if the changeset is 24 hour delayed. Is there a default timeout when liquibase changeset expires? If yes, I would like to change the default value to custom defined value. I have all the source code for liquibase 3.5.x downloaded from https://github.com/liquibase/liquibase/tree/3.5.x. I have already seen the post explaining an explicit way of defining the jdbc timeout How can I set the Liquibase database connection timeout and retry count?. But I am looking into something relating to default timeout in liquibase. If there is a default timeout defined in liquibase source code, please guide me where can I find it and customize the timeout according to my requirement. In the source code, I can see some "timeout"s defined in the postgresql files but cannot find any for the oracle. Please help me resolve this issue. Thanks.
Asked
Active
Viewed 3,103 times
3
-
I think (might be wrong) that there is no statement timeout functionality in liquibase. Liquibase relies on a JDBC Connection to the DB. And the JDBC Connection resp. the JDBC Driver is the one that can define a statement timeout. So I guess you will have to set this on your DB Connection settings for the JDBC Connection. – Jens May 17 '18 at 15:45
-
1Could you please give me an example for it? I don't want to change my application DB connection properties, Can I somehow write a timeout separately, in a properties file or something and invoke this timeout using the -D variable in that specified host which I am executing liquibase? All I wanted to do is to isolate the timeout concept without touching the main application DB connection properties (only exclusive to the specified host) . – Vivek Roshan May 18 '18 at 17:38
1 Answers
3
I found a simple solution to the above mentioned question.
For Oracle JDBC connection:
Liquibase comes with many parameters and one of them is --driverPropertiesFile=/path/to/file.properties, where we can specify the required jdbc parameters and link that properties file to the liquibase update command. An example file.properties can have oracle.jdbc.ReadTimeout=6000 (time in milliseconds).
- It is required to "liquibase releaseLocks" after a timeout.

Vivek Roshan
- 61
- 1
- 8