Skip to content

Instantly share code, notes, and snippets.

@thermosym
Created August 1, 2018 14:57
Show Gist options
  • Save thermosym/1a577ec959d2d1b86c906caf301ea654 to your computer and use it in GitHub Desktop.
Save thermosym/1a577ec959d2d1b86c906caf301ea654 to your computer and use it in GitHub Desktop.
Server: Increasing ulimit on CentOS

/etc/systemd/system/$service.service.d/override.conf

[Service]
LimitNOFILE=100000

/etc/security/limits.d/nofile.conf

* soft nofile 100000
* hard nofile 100000
root hard nofile 100000
root soft nofile 100000 

/etc/sysctl.conf

fs.file-max = 100000

Run

sysctl -p
systemctl daemon-reload
systemctl restart $service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment