Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-904

C# driver memory leak

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 1.8.3
    • Component/s: None
    • Environment:
      Windows Server 2012 R2 x64 / 8.1 x64

      Memory leak in the MongoDB .NET driver.
      My setup is 6 shards/2 servers per RS. Overloaded servers, lot of transport exceptions (might be related to the leak).
      Eventually results in an "Out of memory" exception to be thrown (VERY fast in the real application, with objects up to 16MB).

      I was able to reproduce the issue using the attached test solution (except it occurs much slower than in the real app, because objects are much smaller).

      I'm not sure if the unreliable MongoDB servers are the cause of the memory leak or not.

      I can't post the Ants Profiler results, because it could contain sensitive information (connection strings, etc.)

        1. ants_results_in_progress.png
          ants_results_in_progress.png
          64 kB
        2. memory_leak_test_results.zip
          12.01 MB
        3. Real app - InstanceCategorizer.png
          Real app - InstanceCategorizer.png
          154 kB
        4. Real app - Summary.png
          Real app - Summary.png
          146 kB
        5. Test - InstanceCategorizer.PNG
          Test - InstanceCategorizer.PNG
          133 kB
        6. TestMemoryLeak.zip
          860 kB
        7. Test - Summary.PNG
          Test - Summary.PNG
          167 kB

            Assignee:
            Unassigned Unassigned
            Reporter:
            tubededentifrice Vincent
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: