So clearly, there is an issue with newer versions of Lucee and Database driver. This includes the newest RC and snapshots after RC.
If I upgrade to these versions, after a few days, I get the “FATAL: remaining connection slots are reserved for non-replication superuser connections” error, with either the Postgresql JDBC driver from v9.4.1212 to v8.3.0.jdbc4 drivers (though with v8.3.0, I believe I get Lucee crash with GC overhead limit reached rather than connection error).
With the currently released version of Lucee (v184.108.40.206), I sometimes get a “lucee.runtime.exp.DatabaseException: FATAL: sorry, too many clients already” error message but this usually auto-resolves after a bit of time (ie., I dont have to restart Lucee).
I do use Hibernate / ORM in threads with two servers running the app, accessing the same database. Can someone provide some insight on what could be going wrong and/or how to debug this major issue?