Hi, I am using Apache2 + Flask + PyMongo (4.3.3), there are memory leak observed. I tried Tracemalloc for memory usage snapshot and found top 2 memory consumer here which keep increasing:
lib/python3.10/site-packages/pymongo/message.py:692: size=67.9 KiB (+67.9 KiB), count=1130 (+1130), average=62 B
lib/python3.10/site-packages/bson/init .py:1122: size=42.6 KiB (+42.6 KiB), count=734 (+734), average=59 B
Hi Shane, thanks for the update. So 4.8.0 release should have the fix? We use AWS DocDB, not sure any compatibility issue? Or which version with the fix we can try? Thank you!
There were many improvements to the C extensions fixed between 4.3.3 to 4.8.0. We’re not sure if any will fix your issue specifically but it would be great to start testing the latest version.
We don’t offer technical support for DocumentDB. If you can reproduce the issue with MongoDB then please file an issue with us, otherwise you’ll need to go to DocumentDB.