While monitoring the Jive databases, On-Premise customers may observe a large number of connections, most of them being in status idle. This article explains what is the reason behind this behavior, and how to change it if needed.
Jive uses connection pools in its Tomcat application servers, running in all three main types of Jive servers (Webapp nodes, EAE, and Analytics).
A connection pool is, by definition, a set of pre-instantiated connections to the database, that can be reused on the fly by different server processes.
This removes the time necessary for performing a full connect-query-disconnect cycle for every operation on the database and greatly increases the performance.
By default, the pool settings are:
- Web app nodes: minimum 25, maximum 50 connections
- Analytics nodes: minimum 5, maximum 25 connections
- EAE nodes: maximum 10 connections per webapp node
For example, in a large installation with 9 webapp nodes, 9 analytics nodes, and 1 EAE node, if everything is pointing to the same database instance, assuming that there is at least 1 connection to the EAE, you will have:
- 9 x 25 + 9 x 5 + 1 x 9 = 279 connections at minimum (even if completely idle)
- 9 x 50 + 9 x 25 + 9 x 10 = 765 connections at maximum
You can do your own calculations for your environment and discover what is the expected number of minimum connections (idle) and maximum (during full load).
If idle connections are an issue for your DBA team, you can lower the number of minimum connections in your webapp nodes by modifying the file /usr/local/jive/applications/sbs/home/jive_startup.xml:
Lowering the number of minimum connections will cause a small decrease in performance during sudden load change, as your servers need some time to re-instantiate the connections, but it will not be an issue during normal operation even during heavy load. You can decrease the minimum connections to 15 if necessary. Decreasing under 15, while technically possible, is not recommended.
Changing this setting requires a restart of the webapp node.
For what regards the other servers, it is not recommended to change the minimum connection settings on the Analytics or EAE nodes. In case you need, the settings are stored in the database:
__jive.analytics.database.maxConnections | 25 __jive.analytics.database.minConnections | 5
jive.activitymanager.maxconnections | 10
If your installation is correctly sized, during peak times your servers are expected to use all the available connections up to the number of maximum connections. This implies that your database should be correctly configured to accept the full number of maximum connections from all your servers.
If the maximum number of connections is an issue, the best course of action is to move each function to a dedicated database instance. The three Jive databases (Core, Analytics, EAE) should point to different databases on different servers, as also recommended by the Jive Official Best Practice:
For large installations, it is recommended that the core application database, the Activity Engine database, and the Analytics database be hosted on separate database engines. At a minimum, disk and memory resources should be isolated for each service.