Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-2433

Growth of ServerDescription and AutoReconnect objects leads to memory leak

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Fixed
    • 3.11, 3.11.1
    • 3.11.2
    • Monitoring
    • None
    • ubuntu 16.04
      Python 3.6.8

    Description

        My application use motor 2.0.0 and pymongo 3.11.0 to connect Mongodb cluster , but  when I mistakenly filled in IP as follows,

      connector = motor.motor_tornado.MotorClient(‘192.168.0.10, 192.168.0.11’, 27017)

         There is a space character bewteen ',' and '192.168.0.11', so the application cann't connect to 192.168.0.11:27017 mongos process.  But that doesn't affect the app because the first IP is available,and I find that the memory used by the application grows slowly.

        Then I use memory_analyzer tool to profile memory useage. There were 309 ServerDescription objects and 307 AutoReconnect objects at 2020-11-16 16:55:14, 

      6610 ServerDescription objects and 6607 AutoReconnect objects at 2020-11-17 10:26:43, the result shows both of the ServerDescription and AutoReconnect objects grows by 6301 in 63089 seconds , the frequency is consistent with the frequency of monitoring.

      Attachments

        Issue Links

          Activity

            People

              shane.harvey@mongodb.com Shane Harvey
              xiaoliuhust@gmail.com 肖 刘
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: