-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 1.4.0
-
Component/s: Server Discovery and Monitoring
-
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).