Doker GRPC "Connection reset by peer"

https://success.docker.com/article/ipvs-connection-timeout-issue

 

https://forums.docker.com/t/setting-tcp-keepalive-time-param-for-containers/41496

Approach 1:

  • Modified the docker-compose.yml.tmpl and set the value using sysctl.
    sysctls:
      - net.ipv4.tcp_keepalive_intvl=30
      - net.ipv4.tcp_keepalive_probes=10
      - net.ipv4.tcp_keepalive_time=600

Result:
Did not work. I can see the value set as the env parameter, however netstat shows that the socket is not picking up that value.

Approach 2:

  • Tried to modify the value via sysctl.
    Result:
    Failed since the procfs is a read-only file system on the container.

Can someone help me on how to set this param effectively on the container?

 

Sysctl support for docker swarm cluster added in Docker 19.03.0

 ------------------------

然而并什么有什么用,暂时用Polly重试。

你可能感兴趣的:(Doker GRPC "Connection reset by peer")