apache/couchdb-couch — pull request #1 by sagelywizard (2014-02-13 23:05:32+00:00)
Title: Add hard limit for OS processes

This is the proposed fix for [COUCHDB-2002](https://issues.apache.org/jira/browse/COUCHDB-2002).

Prior to this commit, there was only a soft OS process cap in BigCouch.
This commit adds a hard process cap, in addition to the soft process
cap. When the hard process cap is reached, all requests for additional
processes are blocked until a process becomes available. The soft OS
process limit was left in place, so if the number of OS processes exceed
the soft limit (and some of the processes are idle for a certain amount
of time) Couch will shut down some of the processes.

Also, the soft OS process cap would limit the total number of OS
processes rather than OS processes associated with a particular
language. This was changed to be per-language in order to be consistent
with CouchDB's per-language hard cap.