# exposed


05/09/2022, 3:35 PM
Hi all, I’m facing an issue with the latest exposed version 0.38.2 (also with 0.38.1, but cannot be reproduces with 0.37.3) in combination with HikariCP:5.0.1 and Postgres. For some reason when the maximumLifetime of the connection pool is reached which is 30min by default and the connections are renewed every call afterwards is producing a PSQLException complaining about the transaction isolation level. Am I doing something wrong or should i open a bug ticket since it worked with earlier versions?
Copy code
"level":"WARN","stack_trace":"org.postgresql.util.PSQLException: Cannot change transaction isolation level in the middle of a transaction.\n\tat org.postgresql.jdbc.PgConnection.setTransactionIsolation(\n\tat com.zaxxer.hikari.pool.ProxyConnection.setTransactionIsolation(\n\tat com.zaxxer.hikari.pool.HikariProxyConnection.setTransactionIsolation(
It looks like changing to autoCommit = true does change the behavior and the problem is not present anymore. But i’m not really sure if that is what i want to do.

Mikhail Burshteyn

05/10/2022, 8:11 AM
You should ask this in Github issues rather than here


05/10/2022, 8:22 AM
Okay i will do that. I was just wondering if i do something wrong here and it is actually my fault. Changing the autoCommit to true solved it so i was even more confused. Should one use autoCommit=false with Exposed?