SimpleJDBCConnectionPool "Connect limit has been reached" error with Postgr

Hi,

I started reporting this initially in an old thread but just realized that it’s in the Add-ons forum, because in that era SimpleJDBCConnectionPool was still an add-on, not part of the core of the framework. So this was probably preventing this issue from getting the attention it deserves.

The thread is located
here
; I’ll avoid repeating what I already told there but I’ll summarize that I was getting a lot of “connection limit has been reached” errors when using this connection pool and a PostgreSQL database, although I only have one instance of my connection pool, initialized when my app starts, and I am closing explicitly, as how it needs to be done properly, each connection when I end my database operation (or, more properly, “returning” it to the connection pool).

Solution involved overwritting (again…) SimpleJDBCConnectionPool in order to check for the validity of connections when requesting one to the pool and closing them in case they are not valid anymore. If the assumptions on why is this happening are right and so it the proposed solution, I thing the issue deserves a look from the team…