Skip to content

Instantly share code, notes, and snippets.

@bonesoul
Created September 17, 2014 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bonesoul/ae01decd040bace6b942 to your computer and use it in GitHub Desktop.
Save bonesoul/ae01decd040bace6b942 to your computer and use it in GitHub Desktop.
Daemon RPC timeout fixes

ulimit

checks

cat /proc/sys/fs/file-max

ulimit -n

fixing

echo 1200000 > /proc/sys/fs/file-max

/etc/sysctl.conf

  • fs.file-max = 1200000

/etc/security/limits.conf

    • soft nofile 120000
    • hard nofile 120000
  • root soft nofile 120000
  • root hard nofile 120000

tcp connections

echo "net.ipv4.ip_local_port_range = 20000 65535" >> /etc/sysctl.conf && echo 20000 65535 > /proc/sys/net/ipv4/ip_local_port_range && echo "net.ipv4.tcp_tw_reuse = 1" >> /etc/sysctl.conf && echo "net.core.somaxconn=65535" >> /etc/sysctl.conf && sysctl -p /etc/sysctl.conf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment