0

We are using Springboot 2 and sometime ago we started facing HikariPool connection exhaustion issue. Upon Debugging we found out the that hibernate Open Session in View is by default enabled in Spring.

Now my question is how do we disable it. As the codebase is big enough. If We simply disable it to false. Some part of our code breaks as one session is not being maintained.

  • Now if only there was a `spring.jpa.open-in-view` property that you could set to `false`. THe name of this is even in the logging as a warning is being emitted if you don't explicitly set this. – M. Deinum Mar 17 '22 at 14:13
  • As mentioned if we disable the feature. Some part of our code is breaking as Session is not being maintained. – Sabyasachi Sahoo Mar 17 '22 at 14:21
  • So your code cannot work without that. Fix your code and disable it. – M. Deinum Mar 17 '22 at 14:28

0 Answers0