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 the 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.
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 properties specific for your mine, see “Which properties?” section below.
with values of 20 for the production database and 5 for other databases.
You may need to increase your Postgres parameter max connections, for example to 250.
The InterMine property datasource.maxConnections corresponds to the maximumPoolSize of the HikariCP.
For more information about the properties files in InterMine, please refer to our Tutorial, and in particular to sections
The properties that you should check have a reasonable setting for a database maxConnections are, in order of priority:
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
You’ll also need to update your Tomcat settings. Add clearReferencesStopTimerThreads to your $TOMCAT/conf/context.xml file, so it should look like so:
<Context sessionCookiePath="/" useHttpOnly="false" clearReferencesStopTimerThreads="true"> ... </Context>
While HikariCP default settings are good, there could be situations where some changes could be useful. HikariCP provides a good number of parameters that can be set (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 (InterMine maxConnections).
To set a minimumIdle parameter just add a line like the following to the appropriate properties file