I am building custom health checks for a spring-boot service that connects to 7 different country specific oracle databases. I wanted to build these so I could use spring-boot-admin to monitor the services. The problem is that when a server is unavailable, for example it goes down or a firewall is configured incorrectly the timeout takes a really long time, one minute. Spring-boot-admin then marks the server as unreachable instead of down.
As I understand it what is happening is that the socket is never connecting and eventually the connections hits the other time outs. On my health check I have tried to configure the network timeouts but it does not seem to make any difference. We are using
And ojdbc7
The health check uses the data source beans defined for the main pool but I am not sure if the pool has already been created if it is too late to be setting network timeouts. The issue for me is that the documentation is really unclear about what properties are valid.
I have tired these but they do not seem to do anything
Looked at these links
Setting Network Timeout for JDBC connection
JDBC getConnection timeout issue
PreparedStatement won't ever timeout even if explicitly set
This gives more details of the types of timeouts.
https://www.programering.com/a/MDNzIjMwATY.html
So my question is how should one really set up an oracle pool to cope with network/socket, transaction, pool and statement timeouts?