/etc/default/riak ulimit support #13

Open
Iristyle opened this Issue Mar 27, 2013 · 6 comments

Comments

Projects
None yet
5 participants

I realize this is OS specific, but wondering if you've given any thought to including this?

See basho-labs/riak-chef-cookbook@41661c2 for the chef cookbook

Collaborator

haf commented Apr 3, 2013

Does this mean that riak would be allowed to open more file descriptors?

Iristyle commented Apr 3, 2013

Yes, default is 1024 (at least on Ubuntu which is what we're using) and recommend is a minimum of 4096

http://docs.basho.com/riak/latest/cookbooks/Open-Files-Limit/

I think the most correct way is to probably use PAM... but I haven't tried it out yet.

There are PAM modules floating around at

@haf haf added a commit that referenced this issue Apr 4, 2013

@haf haf Merge pull request #17 from basho/feature/ulimit-centos
ulimit simple implementation

This relates to issue #13 - @Iristyle - could you check which of the options - `/etc/default/riak` or `/etc/pam.d/common-session` should be used and whether that differs between versions of debian/ubuntu?
cbffe46

Iristyle commented Apr 5, 2013

In response to #17 ... from the Riak docs. I think the most correct answer is to set /etc/default/riak and the PAM method.

The initial docs say:

On Ubuntu, if you’re always relying on the init scripts to start Riak, you can create the file /etc/default/riak and specify a manual limit like so:
ulimit -n 65536

...

As init scripts are always run as the root user, there’s no need to specifically set limits in /etc/security/limits.conf if you’re solely relying on init scripts.

But from what I can tell, the PAM method is correct if you need to perform, e.g. join commands over SSH?

Unfortunately I'm not an expert over various distro versions. We're fixed on Precise as its LTS.

For the Chef cookbook we took the /etc/default/riak route for Debian due to the start-stop-daemon init script update: basho-labs/riak-chef-cookbook@26f21f9

Apparently, start-stop-daemon bypasses PAM, which skips overrides in /etc/security/limits.conf.

Collaborator

haf commented Nov 10, 2013

Potential candidate for being used: hercules-team/augeasproviders#35

dalesit commented Oct 29, 2015

I believe this is now in the module from Pull #64, so could presumably be closed.

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