Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-6437

ERROR: mmap() failed for ... len: .... errno:12 Cannot allocate memory when inserting millions of record

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.0.4, 2.0.6
    • Component/s: Stability
    • Environment:
      Operating System: Suse Linux Enterprise Server 10 (Virtual Server on Xen)
      RAM: 10 Gb and 5 Gb
      Cores: 32 (AMD) and 16 (AMD)
    • Linux

      When making massive inserts it reaches a point where the server rejects new inserts with the following error in the logs:

      ERROR: mmap() failed for ...
      len: .... errno:12 Cannot allocate memory

      We have tested making it in PHP and Python, and the problem is the same in both.

      The attachment is a simple script in PHP which causes the error

      We have apparently solver it telling the kernel not to limit the memory size of the MongoDB project with the command

      sysctl -v unlimited

            Assignee:
            Unassigned Unassigned
            Reporter:
            ciges José Manuel Ciges Regueiro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: