DB Connection Pool Tweaks

Description

As supplied by Daniel Hams via https://github.com/igniterealtime/Openfire/pull/1330

we don't use the "failure looping" of the DB connection pool - we found that this means unfair queueing occurs under burst load.

We use a configuration where maxRetries = 0 with a larger maxWaitTime (2.5 seconds).

To help us get there, we made a couple of tweaks - contents:

(1) getConnection logic change - ensure sleep on failure only occurs if we are about to go around the loop and ask for another connection (when maxRetries = 0, this change stops unnecessary sleeps)

(2) poolConfig - if the minimum connections asked for in the db config are set - tweak the poolConfig so that this is allowed (via maxIdleConnections)

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created April 12, 2019 at 3:35 PM
Updated April 12, 2019 at 3:37 PM
Resolved April 12, 2019 at 3:37 PM