0

I am facing a configuration issue within IBM BlueMix. I have 2 items running, which are already connected:

  1. TomCat
  2. ClearDB

Within TomCat an application is deployed (LifeRay) which seem to over-utilize the provided connection pool of ClearDB (4 Connections):

com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: User 'xxxxx' has exceeded the 'max_user_connections' resource (current value: 4)

Within my application I specified a limitation (see last line):

liferay.home=/home/vcap/app/.java-buildpack/tomcat/webapps/ROOT/WEB-INF
jdbc.default.driverClassName=com.mysql.jdbc.Driver
jdbc.default.url=jdbc:mysql://us-cdbr-iron-east-04.cleardb.net/xxxxx?user=xxxxx&password=xxxxx
jdbc.default.username=xxxxx
jdbc.default.password=xxxxx
jdbc.default.maxPoolSize=4

The connection gets established successfully; however I end up in the mentioned exception which causes the Droplet to crash; this also prevents me to check ROOT.xml of TomCat:

App instance exited with guid c2ec8b5e-1b11-42f0-82e8-b58960598be6 payload: {"cc_partition"=>"default", "droplet"=>"c2ec8b5e-1b11-42f0-82e8-b58960598be6", "version"=>"184afb88-2499-49cd-9ed1-f0cb5d042607", "instance"=>"88d43ee42795422c97a6add2b453602a", "index"=>0, "reason"=>"CRASHED", "exit_status"=>148, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1469615393}

As the configuration file seems not be used, I assume that TomCat is mis-configured by CloudFoundy. Any idea how to configure TomCat to limit the connection pool?

This is a playground for myself (PoC); performance does not matter; BlueMix seem not to have any other free database available for testing, which provides more connections.

Any help is highly appreciated!

Fabiansc
  • 1
  • 1

1 Answers1

0

The connections pool can be configured via portal-ext.properties:

# Connection Pool (Default: C3PO)
jdbc.default.liferay.pool.provider=c3po
jdbc.default.acquireIncrement=5
jdbc.default.acquireRetryAttempts=3
jdbc.default.acquireRetryDelay=1000

jdbc.default.connectionCustomizerClassName=com.liferay.portal.dao.jdbc.pool.c3p0.PortalConnectionCustomizer
jdbc.default.idleConnectionTestPeriod=3600
jdbc.default.maxIdleTime=3600
jdbc.default.maxPoolSize=20
jdbc.default.minPoolSize=5
jdbc.default.initialPoolSize=10
jdbc.default.numHelperThreads=10
#jdbc.default.transactionIsolation=1
Fabiansc
  • 1
  • 1