basho / basho_docs

Basho Products Documentation
http://docs.basho.com
Other
169 stars 191 forks source link

Change nofile ulimit instructions for Systemd #2520

Open russelldb opened 6 years ago

russelldb commented 6 years ago

On http://docs.basho.com/riak/kv/2.2.3/using/performance/open-files-limit/#debian-ubuntu following the instructions on a fresh desktop install of ubuntu 17x has no effect on the output of ulimit -n when logging into the desktop/gui environment.

Following the instructions here https://superuser.com/questions/1200539/cannot-increase-open-file-limit-past-4096-ubuntu worked for me. That is setting DefaultLimitNOFILE in both user.conf and system.conf under /etc/systemd

I'm pretty ignorant about linux etc, so there maybe a more correct way, but this is what it took for my desktop install to work.

kesslerm commented 6 years ago

You can also make the appropriate settings in either the *.service file or a an override.conf file for the Riak service. E.g. Elasticsearch does this in its service file.

warmfusion commented 5 years ago

Heres a more explicit version on how to fix it, at least on a Debian host;

mkdir /etc/systemd/system/riak.service.d
cat << EOF >> /etc/systemd/system/riak.service.d/override.conf
[Service]
LimitNOFILE=65536
EOF
systemctl daemon-reload

Then just restart riak.

The real solution is to add LimitNOFILE=65536 into the riak service itself and save this messing around.