Reputation: 65
For some time now,my app started to have a very large CPU consumption. For some time now, my application started to have a very large CPU consumption. I installed JProfiler, and from what I understand it, there is a problem with hibernate's c3p0. I'm using hibernate 4.3, jsf2.2.10 + primefaces 5.2,tomcat 8.5, use ehcache as well.
Here are some of the results I've printed.
Upvotes: 2
Views: 160
Reputation: 58822
You can change to using Hikari connection pool,
See Brett Wooldridge's C3P0 Pool Analysis:
We count over 230 uses of synchronized blocks and methods, and wait() and notifyAll() across various classes. Compare to 0 for HikariCP and Vibur-DBCP which employ lock-free designs. Extensive and wide spread use of locks leads to deadlock-prone code, and evidence of this can be found by Googling "c3p0 deadlock".
We do give C3P0 credit for seemingly covering all of the fundamentals. Unfortunately, C3P0 also consistently comes in last in every one of the microbenchmarks.
Unsafe Defaults By default does not:
test connections at getConnection() time
Upvotes: 5