Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Postgres Connection left in OPEN transaction when autoCommit=false and maxLifetime is reached #2235

Open
kevinchan-rl opened this issue Sep 9, 2024 · 3 comments

Comments

@kevinchan-rl
Copy link

kevinchan-rl commented Sep 9, 2024

Hi,

We noticed our connection pool becomes unusable after maxLifetime has been reached with runtime exception PSQLException: Cannot change transaction isolation level in the middle of a transaction when trying to set the isolation level the first time after getting the connection from the datasource. We are using exposed 0.51 in kotlin.

We have autoCommit=false and default schema set on the hikari datasource.

Attached are the postgres logs for when autoCommit=false and autoCommit=true and you can see the connection init for both the first time and when maxLifetime is reached. Notice that the transaction is left open when autoCommit=false when maxLifetime is reached.

@kevinchan-rl
Copy link
Author

@kevinchan-rl
Copy link
Author

potentially a duplicate of #2144

@quaff
Copy link
Contributor

quaff commented Sep 27, 2024

potentially a duplicate of #2144

It's a duplicate and should be fixed at PostgreSQL JDBC Driver side, see pgjdbc/pgjdbc#3005

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants