Uploaded image for project: 'Perl Driver'
  1. Perl Driver
  2. PERL-294

MongoDB Client Memory Leak when Inserting records - sample code included

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: 0.702.1
    • Fix Version/s: None
    • Component/s: Perl driver
    • Labels:
    • Environment:
      Ubuntu Linux 12.04 LTS (Precise)

      Description

      If you insert records in a loop, the process ram usage grows forever. There seems be a memory leak in the MongoDB PERL Lib. Attached is the simple version of trivial perl script which will eat all the memory on the local machine.

      If you add "Devel::Leak" you can see that MogoDB is allocating new memory in every call to collection->save and not releasing it.

      This makes MongoDB very dangerous to use with long-running perl process.

      CPAN tells me I am using version 0.702.2 of MongoDB. BUT That version is not available in the version list above, so I selected 0.702.1.

      This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-gnu-thread-multi.

        Attachments

          Activity

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: