Skip to content

Preventing disconnection due to network inactivity #42

@abulava

Description

@abulava

I had a frustrating experience with running a net-http2 client on Azure VM. When the client is idle for about 240 seconds, Azure infrastructure will silently drop "outbound SNAT". As a result, I get the :error callback with Errno::ETIMEDOUT in 15 minutes after the async request.

A reply from Azure support confirmed that I was right about my idea to tune the TCP keepalive settings like sysctl -w net.ipv4.tcp_keepalive_time=120. Unfortunately, net-http2 was not affected by this tuning.

I found that net-http2 simply doesn't set the specific socket option SO_KEEPALIVE, which is necessary for TCP keepalive. So, I forked the net-http2 and applied a band aid.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions