Caused by: com.mchange.v2.resourcepool.CannotAcquireResourceException: A
ResourcePool could not acquire a resource from its primary factory or
source.
at com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319)
at com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557)
at com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477)
at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525<beans profile="cloud"> <bean id="c3p0DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close"> <property name="driverClass" value="com.mysql.jdbc.Driver" /> <property name="jdbcUrl" value="jdbc:mysql://${cloud.services.mysql.connection.host}:${cloud.services.mysql.connection.port}/${cloud.services.mysql.connection.name}" /> <property name="user" value="${cloud.services.mysql.connection.username}" /> <property name="password" value="${cloud.services.mysql.connection.password}" /> <property name="minPoolSize" value="5" /> <property name="maxPoolSize" value="20" /> <property name="maxIdleTime" value="20" /> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"> <property name="dataSource" ref="devnexus-db" /> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.hbm2ddl.auto">create</prop> <prop key="hibernate.connection.provider_class">org.hibernate.connection.C3P0ConnectionProvider</prop> </props> </property> <property name="packagesToScan" value="com.iml.policytype.model" /> </bean> <tx:annotation-driven /> <context:component-scan base-package="com.iml.policytype.bo" /> <context:component-scan base-package="com.iml.policytype.dao" /> <bean id="transactionManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager" p:sessionFactory-ref="sessionFactory" /> </beans>
I have a vague memory of the MySQL connection being limited to a really low number of concurrent connections - something like 4 - in CF v1 / on free plans.
Could this be a similar case? Can you set c3po to a really low number of concurrent connections - like 2 - to test?
To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.
Oh, and as Dan mentioned, you just posted your mysql username and password, so you'll probably want to change those soonish.
:)
To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.
I'm pretty sure that the free cleardb plans have a max connection limit of 10.
That said, you should post this question over at support.cloudfoundry.com since they'd be able to give you the specific numbers for run.pivotal.io.
To unsubscribe from this group and stop receiving emails from it, send an email to vcap-dev+u...@cloudfoundry.org.
mysql -D [DATABASE_NAME] -h [HOST_NAME] -P [PORT] -u [USER] -p
but its returning
ERROR 2003 (HY000): Can't connect to MySQL server on 'us-cdbr-east-04.cleardb.com' (10061)
What should I do next? How do I know whether service is configured properly?