DB connections not released on Lucee 5.4.7.3

Hi there!

We recently updated our dev environment to the latest version of Lucee. In this context, we’ve also updated the underlying JVM and Tomcat versions.

Setup now:

OS: Debian 6.1.0-22-amd64
Java Version: 21.0.7 (Eclipse Adoptium) 64bit
Tomcat Version: 9.0.105
Lucee Version: 5.4.7.3
PostgreSQL extension: 42.7.5

Previous setup:

OS: Debian 6.1.0-22-amd64
Java Version: 17.0.15+6-Debian-1deb12u1 / OpenJDK Runtime Environment Temurin-11.0.22+7 (build 11.0.22+7)
Tomcat Version: 9.0.86
Lucee Version: 5.4.5.23
PostgreSQL extension: 42.7.3

Generally, the updated versions work as expected. Though we now experience one issue: Idle connections to our PostgreSQL DB don’t seem to get released anymore, so the number of connections is steadily increasing.

For testing, we’ve reduced the connection limit from 100 down to 50 and and the connection idle timeout from 5 min to 1 min. That didn’t have any effect, though.

Any idea how to fix that issue?

Sebastian

That’s a lot of change at once, of course. I understand: ya gotta do what ya gotta do. :slight_smile:

So first, have you tried simply reverting the Postgres driver back to what it was? That would seem to have the most direct impact on the db connection management, so is worth ruling out first. Then the Lucee version. (And some will suggest you try 6 or 7, but I appreciate that may seem to be “too much work” at this point.)

Second, it’s not clear: did anything about Postgres itself change? Or the server on which it runs, if it’s separate from Lucee’s?

Finally, as for the upgrades regarding Lucee, were those done in-place, or as a new Lucee install? And if the latter, is it on a different server than the first? (We can’t presume either way, since you show your OS version being unchanged.)

Sorry for only questions, but they may help narrow the path to resolution.

Known issue. See DB Connection idle timeout isn't honored in Lucee 6 - #2 by psarin and Jira (and the history specific to v5.x).

If you are able to upgrade to the latest RC for 6.2.2, it may solve your problem. However, it is a big upgrade (upgrade of Tomcat + Java).