I am looking for ways to identify the default timeout
configured on our container application. For this I was trying the nc
command
The application is running on a GCP VM host
with a public IP as a docker container
. The port I am trying to probe does not exists so that I can find the timeout
value for the application.
Probing the IP of the container shows below results
$ time nc -v 172.28.36.5 8546
nc: connect to 172.28.36.5 port 8546 (tcp) failed: Connection refused
real 0m0.005s
user 0m0.000s
sys 0m0.005s
$ time nc -v 34.91.145.25 8546
nc: connect to 34.91.145.25 port 8546 (tcp) failed: Connection timed out
real 2m10.123s
user 0m0.000s
sys 0m0.004s
How the timeout value is calculated as it is different for container ip
and external ip
of the host ?
My task is to increase the tcp timeout
value of the container .
Is it determined by the following parameters ? But in that case it should have been greater than 10 minutes .
$ cat /proc/sys/net/ipv4/tcp_keepalive_time 7200
Any suggestions ?