Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-510

Improve documentation on detecting ulimit problems and how to increase ulimits

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      We get many support cases resulting from ulimits being too low, and some users have difficulties modifying them correctly.

      We have the following pages of documentation on the Wiki:

      and nothing yet that I am aware of in the manual.

      I believe that this documentation should be improved in the following ways:

      1. We should state that changes to ulimit do not take effect until after the process (e.g. the mongos) is restarted.

      2. The page on the Wiki only refers to open files (ulimit -n). I believe that another common limit we hit, and hence should document, is max user processes (ulimit -u), indicated by (at least) by "can't create new thread" errors such as the following:

      Tue Aug 14 04:21:36 [initandlisten] pthread_create failed: errno:11 Resource temporarily unavailable
      Tue Aug 14 04:21:36 [initandlisten] can't create new thread, closing connection
      

      3. We should be more specific with what errors to look for in the log file. That is, "If you see any of the following messages, increase ulimit -n. If you see any of the following messages, increase {ulimit -u}}."

      4. We should provide more specific details for common distributions on how to permanently change ulimit settings (i.e. change them so that they are still in place after a server restart), including information on soft and hard limits. For example, something along the lines of http://posidev.com/blog/2009/06/04/set-ulimit-parameters-on-ubuntu/. We should state that it is a good idea to immediately restart the server after applying the limits, then check them, so that you know that they are in place.

      5. We should state that cat //proc/<pid>/limits will tell you the limits on a running process, once you have its <pid>. That is, run ps auxww | grep mongo first to get the pid.

            Assignee:
            sam.kleinman Sam Kleinman (Inactive)
            Reporter:
            jantje.daniel Ian Daniel
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              11 years, 33 weeks, 4 days ago