Recently we suffered a loss of service in the dev environment caused by a "desyncronization" between connection pool and DB, that means WL thought that the active connections reached its limit (25) while in DB there was no active connections, I've mitigated it by adding a timeout parameter and a test each 60 seconds the inactive ones to test if they are alive already. This should prevent this from happening again it's a pessimistic configuration.
Do you have any hint on what could have caused this error, how to avoid it or where to look for further info?
When you enable the "Test Connections on Reserve" feature, the server instance checks a database connection prior to returning the connection to a client. This helps reduce the risk of passing invalid connections to clients.