You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jared Biel (JIRA)" <ji...@apache.org> on 2016/08/10 22:11:20 UTC

[jira] [Created] (CASSANDRA-12432) Set ulimit for nproc in debian init script

Jared Biel created CASSANDRA-12432:
--------------------------------------

             Summary: Set ulimit for nproc in debian init script
                 Key: CASSANDRA-12432
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12432
             Project: Cassandra
          Issue Type: Improvement
            Reporter: Jared Biel
            Priority: Minor


While using Cassandra 2.2.7 (installed from official package) on Ubuntu 14.04 I noticed a warning on startup:

{noformat}
WARN  [main] 2016-08-10 21:53:53,219 SigarLibrary.java:174 - Cassandra server running in degraded mode. Is swap disabled? : true,  Address space adequate? : true,  nofile limit adequate? : true, nproc limit adequate? : false
{noformat}

I set about researching how that value is set and how to increase it. I found the [Datastax documentation on recommended settings|http://docs.datastax.com/en/landing_page/doc/landing_page/recommendedSettingsLinux.html] and tried to increase the nproc limits according to that doc to no avail. I eventually found a [stackoverflow post|http://superuser.com/questions/454465/make-ulimits-work-with-start-stop-daemon] that states that start-stop-daemon (which the C* init script uses) doesn't/can't use the values specified in the limits.conf files.

I solved this by adding a {{ulimit -p 32768}} entry to the init script below the other two ulimit commands. Note the the flag is "-p" for dash (default /bin/sh on Ubuntu), but the flag is "-u" on bash. As Debian has had [dash as default|https://wiki.debian.org/Shell] since squeeze (2011-02-06), this should be safe on most Debian based distros.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)