flimzy commented on a change in pull request #169: Improve docs on increasing max file handle limits URL: https://github.com/apache/couchdb-documentation/pull/169#discussion_r142001611
########## File path: 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 cate 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 jessie Review comment: Maybe include the Debian version number, not just codename? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
