Skip to content

Instantly share code, notes, and snippets.

@rilian
Last active May 22, 2017 14:32
Show Gist options
  • Save rilian/cf952b3521d50c38f9e8624535b6036a to your computer and use it in GitHub Desktop.
Save rilian/cf952b3521d50c38f9e8624535b6036a to your computer and use it in GitHub Desktop.
connection fix for Azure
# Display the current tcp_keepalive_time value.
$ cat /proc/sys/net/ipv4/tcp_keepalive_time
# Set tcp_keepalive_time to 60 seconds and make it permanent across reboots.
$ echo 'net.ipv4.tcp_keepalive_time = 60' | sudo tee -a /etc/sysctl.conf
# Apply the change.
$ sudo /sbin/sysctl --load=/etc/sysctl.conf
# Display the tcp_keepalive_time value to verify the change was applied.
$ cat /proc/sys/net/ipv4/tcp_keepalive_time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment