Outbound database connection from docker container loses connection if connection is idle for 5 minutes

Hi,

I am currently working on a project to convert existing application to run on centOS docker.

Application makes a connection to database which is installed on internal server.

I installed sqlplus on centOS docker and tested out application, but it seems like connection to database is lost if it stays idle for more than 5 minutes.

I researched how to set keep alive on CentOS and verified that these values are set

net.ipv4.tcp_keepalive_time = 7200
net.ipv4.tcp_keepalive_probes = 9
net.ipv4.tcp_keepalive_intvl = 75

Here is the screenshot from “netstat -alop” on process that has database connection

This application works without any problem if I run it on VM, so I do not think it will be the configuration problem on Database.

Did anyone have similar issue before?

Any advice or suggestion would be appreciated

Thanks