HikariCP - sergiocontrino/docs GitHub Wiki
InterMine, starting with release 1.4, is using HikariCP as its default JDBC connection pool. If this is not available, InterMine will use the default postgresql distribution (PGPoolingDataSource).
HikariCP is a fast, reliable and lightweight connection pool. For details about the improvements it brings please refers to https://github.com/brettwooldridge/HikariCP.
From the InterMine user point of view, the main change is that the maximum number of connections allocated to a database, set in properties files, is now reserved at the start and it is not any longer a ceiling to the number of connections a database can reach.
Please note that this corresponds to the maximumPoolSize of the HikariCP (see below).
As a consequence, setting for the previously used connection pool could exhaust the postgresql allocation at start up (either of building an InterMine database or a web application).
InterMine properties has been updated to deal with the change, but you could still need to edit the datasource.maxConnections property for your mine in your yourmine directory in the InterMine code checkout in case you set it there. This apply also to your properties file in your .intermine directory.
For more information about the properties files in InterMine, please refer to our tutorial documentation (getting started), and in particular to
http://intermine.readthedocs.org/en/latest/get-started/tutorial/#creating-a-new-mine http://intermine.readthedocs.org/en/latest/get-started/tutorial/#properties-file
###Which properties?
The properties that you should check have a reasonable setting for a database maxConnections are, in order of priority:
- YOUR_MINE.properties in your .intermine directory (if you set them there)
- YOUR_MINE/default.intermine.integrate.properties (for building a mine)
- YOUR_MINE/default.intermine.webapp.properties (for building a web application)
Default values are set in the files
- intermine/default.intermine.integrate.properties
- intermine/default.intermine.webapp.properties
Some further information about the order of precedence for the setting of properties is available, for the web application, at http://intermine.readthedocs.org/en/latest/webapp/properties/web-properties/?highlight=overrides#overriding-properties
###Other HikariCP configurations. While HikariCP default settings are generally fine, there could be situations where some changes could be interesting, and HikariCP provides a good number of parameters that canbe changed (see the configuration section at https://github.com/brettwooldridge/HikariCP).
For example, sometime it can be useful, to avoid exceeding the number of connections set in the database, to set the minimumIdle number of connections. This could be the case in development and when deploying multiple webapps.
For performance purposes is nevertheless suggested by Hikari people to have
minimumIdle = maximumPoolSize (our maxConnections).
To set a minimumIdle parameter just add a line like the following to the appropriate properties file
db.production.datasource.minimumIdle=10
###Further readings and references https://github.com/brettwooldridge/HikariCP/wiki/About-Pool-Sizing