InterMine now uses HikariCP as its default JDBC connection pool. If this is not available, InterMine will use the default PostgreSQL distribution,
The maximum number of connections allocated to a database, set in the properties files, is now reserved at the start and it is 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).
Reasonable settings for
datasource.maxConnectionsare 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.
maxConnections property is set in
default.intermine.production.properties in InterMine:
You can override this property in your mine's property file.
You'll also need to update your Tomcat settings. Add
clearReferencesStopTimerThreads to your $TOMCAT/conf/context.xml file, so it should look like:
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 HikariCP).
For example, sometimes it can be useful to set the minimumIdle number of connections in order to avoid exceeding the number of connections set in the database. This could be the case in development and when deploying multiple webapps. For performance purposes, it is suggested by Hikari people to have
minimumIdle = maximumPoolSize (InterMine maxConnections). To set a minimumIdle parameter, just add a line like the following to your mine's properties file: