You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2017/09/30 18:28:17 UTC

[couchdb-documentation] branch ulimit-info updated (4103951 -> b4c8a6c)

This is an automated email from the ASF dual-hosted git repository.

wohali pushed a change to branch ulimit-info
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git.


    omit 4103951  Improve docs on increasing max file handle limits
     new b4c8a6c  Improve docs on increasing max file handle limits

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (4103951)
            \
             N -- N -- N   refs/heads/ulimit-info (b4c8a6c)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/maintenance/performance.rst | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

-- 
To stop receiving notification emails like this one, please contact
['"commits@couchdb.apache.org" <co...@couchdb.apache.org>'].

[couchdb-documentation] 01/01: Improve docs on increasing max file handle limits

Posted by wo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch ulimit-info
in repository https://gitbox.apache.org/repos/asf/couchdb-documentation.git

commit b4c8a6c560be9aea6e5d19cfcd86276e31777bc8
Author: Joan Touzet <jo...@atypical.net>
AuthorDate: Fri Sep 29 22:05:19 2017 -0400

    Improve docs on increasing max file handle limits
---
 src/maintenance/performance.rst | 40 ++++++++++++++++++++++++++++++++--------
 1 file changed, 32 insertions(+), 8 deletions(-)

diff --git a/src/maintenance/performance.rst b/src/maintenance/performance.rst
index ac2f08f..5ee2a12 100644
--- a/src/maintenance/performance.rst
+++ b/src/maintenance/performance.rst
@@ -120,20 +120,44 @@ explanation`_.
 .. _this tip for a possible workaround: http://erlang.org/pipermail/erlang-questions/2011-December/063119.html
 .. _this thread for a deeper explanation: http://erlang.org/pipermail/erlang-questions/2011-October/061971.html
 
-PAM and ulimit
---------------
+Maximum open file descriptors (ulimit)
+--------------------------------------
 
-Finally, most \*nix operating systems impose various resource limits on every
-process. If your system is set up to use the Pluggable Authentication Modules
-(`PAM`_) system, increasing this limit is straightforward. For example,
-creating a file named ``/etc/security/limits.d/100-couchdb.conf`` with the
-following contents will ensure that CouchDB can open enough file descriptors
-to service your increased maximum open databases and Erlang ports::
+Most \*nix operating systems impose various resource limits on every process.
+The method of increasing these limits varies, depending on your init system and
+particular OS release. The default value for many OSes is 1024 or 4096. On a
+system with many databases or many views, CouchDB can very rapidly hit this
+limit.
+
+If your system is set up to use the Pluggable Authentication Modules (`PAM`_)
+system (as is the case with nearly all modern Linuxes), increasing this limit
+is straightforward. For example, creating a file named
+``/etc/security/limits.d/100-couchdb.conf`` with the following contents will
+ensure that CouchDB can open up to 4096 file descriptors at once::
 
     #<domain>    <type>    <item>    <value>
     couchdb      hard      nofile    4096
     couchdb      soft      nofile    4096
 
+You may also have to edit the ``/etc/pam.d/common-session`` and
+``/etc/pam.d/common-session-noninteractive`` files to add the line::
+
+    session required pam_limits.so
+
+if it is not already present.
+
+For systemd-based Linuxes (such as CentOS/RHEL 7, Ubuntu 16.04+, Debian 8
+or newer), assuming you are launching CouchDB from systemd, you must also
+override the upper limit by creating the file
+``/etc/systemd/system/<servicename>.d/override.conf`` with the following
+content::
+
+    [Service]
+    LimitNOFILE=#######
+
+and replacing the ``#######`` with the upper limit of file descriptors CouchDB
+is allowed to hold open at once.
+
 If your system does not use PAM, a `ulimit` command is usually available for
 use in a custom script to launch CouchDB with increased resource limits.
 If necessary, feel free to increase this limits as long as your hardware can

-- 
To stop receiving notification emails like this one, please contact
"commits@couchdb.apache.org" <co...@couchdb.apache.org>.