Configuring the database connection pool
This page describes how to change the default database connection pool settings used by Fisheye and Crucible.
Fisheye and Crucible use the BoneCP connection pool manager to manage connections to the database. The BoneCP connection pool manager has been preconfigured in Fisheye and Crucible to work out-of-the-box for most customers. However, you can override any of the default settings to fine tune performance, if you wish. For example, you may want to try increasing the minimum and/or maximum number of connections, if you are getting significant delays creating connections for clients.
Setting Minimum and Maximum Database Connections
To configure the database connection pool:
- Log in to Fisheye or Crucible as an administrator.
- In the Admin area, click Database (under 'System Settings').
- Enter new values for the Minimum Pool Connections and Maximum Pool Connections fields.
- Advanced users only. Enter any overrides of BoneCP properties in the Parameters field. Enter each parameter-value pair on a new line in the Parameters field. See the section below for details of some common properties you may wish to configure.
Screenshot: Database configuration screen in Fisheye / Crucible
Advanced: Tuning The Connection Pool via Properties
The following table shows some properties you can use to tune the database connection pool used by Fisheye and Crucible. You can override any of these parameters by entering parameter-value pairs (on separate lines) into the Parameters field of the 'Database Configuration' dialog, as described above.
Refer to the for a full list and description of BoneCP properties.
|パラメータ||Property and Default Value||説明|
|Connection timeout||Time to wait before dropping idle connections, in minutes. Zero means that idle connections will stay open forever.|
|Connection test period||Database connections are kept alive by sending ping requests on idle connections. This value sets the time between pings, in minutes.|
|Connection pool partition count||The database connection pool is split into a number of equal-sized "partitions" to increase concurrent performance. This property sets the number of partitions to use.|
Note that if you set this property, but not the
|Max and min number of connections per partition|
Defaults calculated based on value of
These properties control the minimum and maximum number of connections in each partition. To calculate the the total number of connections in the pool:
Note that setting these properties overrides the "Minimum Pool Connections" and "Maximum Pool Connections" field settings.
|Connection acquire increment||The batch size used when BoneCP will acquire new connections.|
|Statement cache size||The statement cache size defaults to 50, except when using an Oracle database, for which it defaults to zero to avoid having too many open cursors.|
|Connection test query|
By default boneCP will use a metadata request.
The query to send to the DB to maintain keep-alives and test for dead connections. This is database specific and should be set to a query that consumes the minimal amount of load on the server.
If you do not set this, then BoneCP will issue a metadata request instead that should work on all databases but is probably slower. (Note: In MySQL, prefixing the statement by /* ping *\/ makes the driver issue 1 fast packet instead. See http://blogs.sun.com/SDNChannel/entry/mysql_tips_for_java_developers )