I have a web application which is deployed in jboss server. I use java 7 and postgres 9.3 and I use c3p0-0.9.5.2.jar I have about 3000 users who connect to the system My problem is that the CPU usage is 100% in Windows Server 2012-R2 after 5 hours of starting the server application. (meaning after load usage of the system) this is my hardware configuration 16 GB ram and 8 virtual process I use this configuration in applicationContext-db.xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <bean id="dataSource" class = "com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="driverClass" value="org.postgresql.Driver"/> <property name="jdbcUrl" value="jdbcostgresql://10.60.60.20:5432/prodDB"/> <property name="user" value="postgres"/> <property name="password" value="postgres"/> <!-- pool sizing --> <property name="initialPoolSize" value="32" /> <property name="minPoolSize" value="30" /> <property name="maxPoolSize" value="300" /> <property name="acquireIncrement" value="10" /> <property name="maxStatements" value="0" /> <!-- retries --> <property name="acquireRetryAttempts" value="30" /> <property name="acquireRetryDelay" value="1000" /> <!-- 1s --> <property name="breakAfterAcquireFailure" value="false" /> <!-- refreshing connections --> <property name="maxIdleTime" value="180" /> <!-- 3min --> <property name="maxConnectionAge" value="10" /> <!-- 1h --> <!-- timeouts and testing --> <property name="checkoutTimeout" value="0" /> <!-- 30s --> <property name="idleConnectionTestPeriod" value="60" /> <!-- 60 --> <property name="testConnectionOnCheckout" value="true" /> <property name="preferredTestQuery" value="SELECT 1" /> <property name="testConnectionOnCheckin" value="true" /> </bean> </beans> I think that I should change the value of checkoutTimeout Continue reading...