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
Fixed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Unassigned

Reporter

Greg Thomas