Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-1216

Mongos topology leaks memory on every re-connect via the serverDescriptionChanged event listener

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.0.0
    • Affects Version/s: 2.2.33
    • Component/s: None

      The issue occurs only when using the "mongos" topology. Removing the offending event listener on connection close seems to solve the issue:

      db.s.topology.s.mongos.on('joined', (_, server) => {
      	server.once('close', () => {
      		server.removeAllListeners('serverDescriptionChanged');
      	});
      });
      

            Assignee:
            jessica.lord Jessica Lord
            Reporter:
            ragnis Ragnis Armus
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: