Presto Administration : Presto and MashZone Repositories : Tuning the Presto or MashZone Repository Connection Pool
Tuning the Presto or MashZone Repository Connection Pool
In addition to basic connection configuration, you can configure the connection pools for the Presto Repository or the MashZone Repository. In many cases, you need to tune this configuration to optimize your Presto environments.
Note:  
For a complete list of connection properties, see TomEE Datasource Properties.
To tune the connection pool, you update properties in the <Resource> element for the Presto or MashZone repository in the presto-install/apache-tomee-jaxrs/conf/tomee.xml file and then restart Presto to apply these changes.
Connection Pool Size Properties
initialSize
The initial number of connections to create when the pool starts up. This defaults to 0.
maxActive
The maximum number of connections that can be allocated at one time. This defaults to 20. Set this to -1 to remove all limits.
maxWaitTime
The maximum number of milliseconds that the pool will wait when no connections are available before failing. Defaults to -1 which is an indefinite wait.
Idle Pool Connection Properties
maxIdle
The maximum number of connections that can be idle without connections being released. Defaults to 20. Set this to -1 to prevent any connections being released.
minIdle
The minimum number of idle connections that can exist before new connections are added to the pool. This defaults to 0, indicating no new connections should be created.
testWhileIdle
Whether connections should be tested when idle.
If this is enabled, idle connections are tested using the Validation query. See Move the Presto and MashZone Repositories to a Robust Database Solution for more information on validation queries.
timeBetweenEvictionRuns
The number of milliseconds between tests of idle connections. This defaults to -1, which prevents all idle connection testing.
numTestsPerEvictionRun
The number of connections to test during any idle connection test run.
minEvictableIdleTime
The minimum number of milliseconds that a connection can be idle before being tested for eviction. Default is 3 minutes.
Copyright © 2006-2015 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback