Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1750

memory leak in topology.Server

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.5.2
    • Affects Version/s: 1.4.0
    • None
    • Environment:
      Linux, Go 1.15

      I've noticed that my application is leaking memory in `toology.Server`. It think it's not closing the "context cancel" properly. See the attached screenshot (it's from the DataDog continuous profiling)

      It started to happen since I upgraded to the Go MongoDB driver v1.4.0. It was perfectly fine with v1.3.x.

      I'm always using the same MongoDB "client" object, I'm creating it at the application startup, and I continue to use the same object. I'm not creating thousands of client objects.

      My application is a monitoring tool that fetches the "current op" periodically. It calls `RunCommand()` with `{"currentOp":1, "active": true}`. I suspect it could be related to this, because I don't notice similar issues in my other apps (that are running normal "find" commands).

        1. 2021-02-22 09-57-34 的螢幕擷圖.png
          58 kB
          舜元 施
        2. Capture d’écran du 2020-09-16 09-47-32.png
          113 kB
          Pierre Durand
        3. image-2021-03-11-17-22-19-452.png
          70 kB
          孟修 N/A

            Assignee:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Reporter:
            pierrre Pierre Durand
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: