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.
That’s a lot of change at once, of course. I understand: ya gotta do what ya gotta do.
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.
Thank you for the quick replies! And excuse my late reply!
That’s what delayed my reponse. We were checking the different PostgreSQL driver versions when I posted my question. And that took several days to get proper results.
We can now confirm that 42.7.5 is the culprit. 42.7.3 was working fine. We’ll try out 42.7.7 once available, though it doesn’t seem to be offered yet in the Lucee admin.
To answer the other questions and for reference if anybody else runs into problems when upgrading:
We also just started to (finally) evaluate the upgrade to 6.2, though wanted to upgrade to the latest bugfix release of 5.4, first.
No, the PostgreSQL version did not change, nor the (separate) servers on which Lucee and the DB run.
The upgrade was done in-place. The upgrade to 6.2 will be a new install.
@carehart we were facing the issue somehow I see that my previous message didn’t come up into the thread properly.
Our previous stack was like that
Lucee 6.2.1.122
Java 21.0.7 (Eclipse Adoptium) 64bit
PostgreSQLextension 42.7.5
Apache Tomcat/11.0.6
OS Linux (6.8.0-1029-aws) 64bit
And now upgrading to the new RC version and the new postgresql driver everything is running smooth.
I have to come back to this topic. The connections now did accumulate again after them being stable for the last two weeks. So the issue doesn’t seem to be completely fixed in 42.7.7.
I couldn’t pinpoint the reason for this yet. Though from what I can see, the idle connections are not closed as expected.
Current setup is a connection limit of 50 and 1m of connection timeout and idle timeout but the connections stay open for much longer, sometimes several minutes up to several days.
My hypothesis is that this might be related to queries executed inside threads, as we have a few of them running inside threads, but we also see idle connections with queries that are unrelated to threading.
So, generally speaking, the connection pooling doesn’t work as expected. And the issue is not totally gone yet, even when the connections didn’t accumulate over the past two weeks.
We see the same. Things are better with Lucee 6.2.2 RC 54+ and 42.7.7 driver but occasionally see hung connections. Narrowed it down to, whenever a thread doesn’t complete successfully (e.g., timeout due to long running, or error within thread processing), all open connections that the thread used remain open in Postgres and remain idle forever, even with setting keep alive or connection time out’s.