First, the root cause needs to be identified so that the solution can then be identified. To do this, follow the instructions below:
- If there is any tooling available that shows how many connections are present on the database server from the Gateway, review that data and determine if the connections are all used or if there is ample connections available. If the maximum connections set on the database is 2000, for example, see if nearly all 2000 connections are utilized, or if it's well under that.
- If there is any tooling available that shows how many JDBC connections are consumed/utilized on the API Gateway nodes, then this should be used to review the data to see if they are all utilized or if there is ample connections available from the JDBC C3P0 pool.
If the database server connections are all utilized...
- The database connection size should either be increased to allow for more connections, or the database can simply be restarted to clear out all active current connections. The restart is considered to be more of a workaround though in this case as ultimately there were too many connections to the database and it would need to be able to handle that traffic volume. Typically there is a property for the database server that specifics the maximum number of connections allowed.
If the database server connections are not all utilized...
- This would generally suggest the issue is on the Gateway nodes where the pool size for the JDBC connection has been fully utilized. This means no more outgoing requests can be made from the Gateway to the JDBC destination. In such a case, the pool should be increased to allow for more JDBC connections outbound from the Gateway nodes. Temporarily, a restart of the SSG service can provide relief as it will terminate all active JDBC connections.