Liquibase update doesn't close connections, when web application keeps running
See original GitHub issueGiven I have web application and enable liquibase updates with liquibase.enabled=true.
The application connects to Oracle db.
Let’s say I have 2 users/schemas, one for deployment, second one for the application:
- appdeploy
- appuser
Application properties look like:
- liquibase.url=jdbc:oracle:thin:@localhost:1521:XE
- liquibase.user=appdeploy
- liquibase.password=appdeploy
- spring.datasource.url=jdbc:oracle:thin:@localhost:1521:XE
- spring.datasource.username=appuser
- spring.datasource.password=appuser
When I boot up the application (whereas liquibase update is executed) and I try to DROP USER appdeploy CASCADE;
Then I get ORA-01940: cannot drop a user that is currently connected
what indicates web application didn’t release db connections
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Liquibase in Spring boot application keeps 10 connections open
We have at this moment 3 different microservices in deployment and we noticed that for every running instance, Liquibase opens 10 connections ......
Read more >5 Ways to Fix a Bad Database Change in Liquibase
First, let's focus on fixing up the environment where the bad database change was made. We won't worry about upstream or downstream environments ......
Read more >Getting Started | Liquibase Best Practices
After your changelog is created, running liquibase update deploys any undeployed changes to a target database. Don't worry, Liquibase keeps track of what's ......
Read more >Spring Boot Reference Documentation
In that case, run scoop update and try again. Quick-start Spring CLI Example. You can use the following web application to test your...
Read more >Handling java.sql.SQLRecoverableException: Closed ...
This error message indicates that the connection used by the backup task (or any other long-running operation that relies on a single database ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I think the problem is that we use
DataSourceBuilderto create the Liquibase-specificDataSource. It will be using a connection pool so it will create and keep open whatever the default number of connections is for the pool. I think we need to do one of the following:Yeah, it will. It’s only marked as being in 1.4.7 as GitHub only allows a single milestone to be assigned to an issue. Anything fixed in 1.4.x (as this was) is also merged forwards into 1.5.x and master.