Ashok9
asked on
c3p0 mysql hibernate configuration
It creates 225 connections. so my tomcat serves for 225 requests and after that those connections goes to sleep mode in mysql. So further requests to tomcat are not responded. Please let me know what changes to be done to overcome this. Because this is currently in production.
Hibernate configuration
Hibernate configuration
<property name="connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</property>
<property name="hibernate.c3p0.min_size">5</property>
<property name="hibernate.c3p0.max_size">225</property>
You can change the value from 225 to a higher number.
ASKER
Ideally it should reuse the connections. But why its not using existing connections? Also all the connections are sleeping...?
Have you set max_statements? (I'm just guessing here)
<property name="hibernate.c3p0.max_s tatements" >50</prope rty>
<property name="hibernate.c3p0.max_s
ASKER
what does max_statements do? Does it stop using connection after the max_statements?
ASKER
I tried it with the value of 10. but it was of no use it again makes connections to sleep mode.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.