Skip to content

Instantly share code, notes, and snippets.

@bugra-derre
Created August 6, 2013 12:43
Show Gist options
  • Save bugra-derre/6164123 to your computer and use it in GitHub Desktop.
Save bugra-derre/6164123 to your computer and use it in GitHub Desktop.
Open Files Limit for Riak in Ubuntu
#!/bin/bash -ex
cat >limits.conf <<END_OF_FILE
* soft nofile 32768
* hard nofile 32768
root soft nofile 32768
root hard nofile 32768
* soft memlock unlimited
* hard memlock unlimited
root soft memlock unlimited
root hard memlock unlimited
* soft as unlimited
* hard as unlimited
root soft as unlimited
root hard as unlimited
END_OF_FILE
sudo mv limits.conf /etc/security/limits.conf
sudo chown root:root /etc/security/limits.conf
sudo chmod 755 /etc/security/limits.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment