Setting Driver or OS TCP Keepalive
SQL
PostgreSQL tcpKeepAlive=true
MySQL tcpKeepAlive=true
Oracle oracle.net.keepAlive=true
linux
vim /etc/sysctl.conf
# detect dead connections after 70 seconds net.ipv4.tcp_keepalive_time = 60 net.ipv4.tcp_keepalive_intvl = 5 net.ipv4.tcp_keepalive_probes = 3
see
https://github.com/brettwooldridge/HikariCP/wiki/Setting-Driver-or-OS-TCP-Keepalive
