Slow PrelimCheckoutResource

Hi

I´m using the hibernate 5.2.17-final with c3p0 on version 0.9.5.3. At my pool connection, we have about from 1000 to 2500 simultaneous connection. And for some reason, it´s takes a little bit to execute the prelimCheckoutResource method, because it´s blocked on an Object. It´s takes about some seconds, but, for our application this seconds affect directly the operation. Anyone have any clue to speedup or avoid this step?

My hibernate dasource configuration is:

<datasource> <property name="hibernate.c3p0.min_size">100</property> <property name="hibernate.c3p0.max_size">3000</property> <property name="hibernate.c3p0.timeout">600</property> <property name="hibernate.c3p0.acquireIncrement">100</property> <property name="hibernate.connection.url">jdbc:sqlserver://xxxxx.com:1433;databaseName=XXXXXX;applicationName=XXX-N1</property> <property name="hibernate.connection.driver_class">com.microsoft.sqlserver.jdbc.SQLServerDriver</property> <property name="hibernate.generate_statistics">false</property> <property name="hibernate.show_sql">false</property> <property name="hibernate.dialect">org.hibernate.dialect.SQLServer2012Dialect</property> <property name="hibernate.connection.username">XXXXX</property> <property name="hibernate.connection.password">XXXXXX</property> <property name="hibernate.c3p0.preferredTestQuery">SELECT 1</property> <property name="hibernate.c3p0.testConnectionOnCheckout">false</property> <property name="hibernate.c3p0.testConnectionOnCheckin">false</property> <property name="hibernate.c3p0.idleConnectionTestPeriod">30</property> <property name="hibernate.connection.isolation">1</property> <property name="hibernate.c3p0.numHelperThreads">50</property> </datasource>

You should ask this question on the forum of your connection pool provider, as this has nothing to do with Hibernate. Either way, the beauty of connection pool providers is that you can easily switch. Try a different provider like e.g. HikariCP.

Hi Beikov,

Thanks for your reply.