Here are some suggestions to help manage the DB connection.
1. Set the max connections for the datasource pool lower than 2000. Work with your DBA to determine how much activity occurs and how many connections are required. You may find it can be set much lower than 2000.
2. Periodically restart the listener on the database to clear stale connections. This will prevent the need for the DB to be restarted.
3. If the above items do not resolve the problem try adding these validation elements to the oristore datasource. to clear stale connections.
The validation elements should be like this:
<check-valid-connection-sql>select 1 from dual</check-valid-connection-sql>
When the <validate-on-match> option is set to true, the database connection is validated every time it is checked out from the connection pool . You will not need background-validation when validate-on-match is true so please set that to false.
For vAPP, you can run the following via the JBoss/Wildfly CLI: