Hi all,
Please note my Hibernate connection pooling settings and MySQL settings
Code:
<property name="c3p0.max_size">8</property>
<property name="c3p0.min_size">5</property>
<property name="c3p0.initial_pool_size">5</property>
<property name="c3p0.timeout">200</property>
MySQL:
MaxConnections 200
Wait-timeout 100
1) Despite of having only 8 connections in the c3p0.max_size, the application went on to acquire 200 connections when requested for.
Also, the connections were killed after 100 seconds - not 200 seconds as specified in the hibernate configuration file.
2) Also, when the application requested for 10 connections, hibernate did not seem to use the
available connections right out of the pool. It acquired 10 extra connections.
3) While the webapp using Hibernate was running:
(a) I could see these logs:
Code:
1562426 [Timer-41] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - BEGIN check for expired resources. [com.mchange.v2.resourcepool.BasicResourcePool@803f84]
1562426 [Timer-41] DEBUG com.mchange.v2.resourcepool.BasicResourcePool - FINISHED check for expired resources. [com.mchange.v2.resourcepool.BasicResourcePool@803f84]
(b) I kept observing the MySQL Administrator - Server Connections tab and noticed that though none of my code was running, newer connections (around 100 in number) were being established and destroyed after a few minutes.
Why do the MySQL properties override the Hibernate properties?
Please help.
Regards,
N