Search code examples
javaoraclehibernateconnection-poolingc3p0

Can't open connection


I develop an applivation with very load(request). I used following technologies in my appliation:

  1. Jpa/Hibernate as persistense layer
  2. Spring and Spring Dao
  3. C3p0 as connection pooling

my problem is : I run my application , when number of request increase, throw exception in persistense layer that"Cannt open connection" I increase oracle max session but my problem not solve I indept in C3p0 document and test its options but my problem not solve.

Thank you for your attention


Solution

  • You increased max sessions on Oracle, but you didn't increase the max size of your connection pool. The exception is telling you that your pool is exhausted. Either find what's holding connections open and get them released sooner, or increase the number of max active connections in the pool.