question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Liquibase update doesn't close connections, when web application keeps running

See original GitHub issue

Given 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:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
wilkinsonacommented, May 13, 2017

I think the problem is that we use DataSourceBuilder to create the Liquibase-specific DataSource. 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:

  • Bypass the connection pool entirely
  • Tune it so that it doesn’t keep any connections open
  • Close it once Liquibase has migrated the database.
1reaction
wilkinsonacommented, May 15, 2017

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found