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

connection does not destroyed when mongos server restarts

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5
    • Component/s: Native
    • Environment:
      any platform

      While node is running, connections to mongos increase continuously after mongos server restarted.
      When I use '"mongodb": "^3.0.0"'~'"mongodb": "^3.0.6", connections do not destroyed after mongos restarted.

      [ID@MONGOS_SERVER ~]$  netstat | grep ESTABLISHED | grep 64 | grep 144 | wc
            0       0       0
      [ID@MONGOS_SERVER ~]$ date
      Wed Apr 11 17:49:37 KST 2018
      [ID@MONGOS_SERVER ~]$  netstat | grep ESTABLISHED | grep 64 | grep 144 | wc
            7      42     623
      [ID@MONGOS_SERVER ~]$ pkill mongos
      [ID@MONGOS_SERVER ~]$ numactl --interleave=all mongos -f /workspace/db/config/mongos.conf &
      [1] 155819
      [ID@MONGOS_SERVER ~]$ about to fork child process, waiting until server is ready for connections.
      forked process: 155821
      child process started successfully, parent exiting
      
      [1]+  Done                    numactl --interleave=all mongos -f /workspace/db/config/mongos.conf
      [ID@MONGOS_SERVER ~]$ date
      Wed Apr 11 17:49:56 KST 2018
      [ID@MONGOS_SERVER ~]$  netstat | grep ESTABLISHED | grep 64 | grep 144 | wc
           14      84    1246
      [ID@MONGOS_SERVER ~]$ date
      Wed Apr 11 17:52:45 KST 2018
      [ID@MONGOS_SERVER ~]$  netstat | grep ESTABLISHED | grep 64 | grep 144 | wc
           14      84    1246
      [ID@MONGOS_SERVER ~]$ pkill mongos
      [ID@MONGOS_SERVER ~]$ numactl --interleave=all mongos -f /workspace/db/config/mongos.conf &
      [1] 156799
      [ID@MONGOS_SERVER ~]$ about to fork child process, waiting until server is ready for connections.
      forked process: 156801
      
      [ID@MONGOS_SERVER ~]$ child process started successfully, parent exiting
      
      [1]+  Done                    numactl --interleave=all mongos -f /workspace/db/config/mongos.conf
      [ID@MONGOS_SERVER ~]$  netstat | grep ESTABLISHED | grep 64 | grep 144 | wc
           21     126    1869
      [ID@MONGOS_SERVER ~]$  netstat | grep ESTABLISHED | grep 64 | grep 144 | wc
           27     162    2403
      [ID@MONGOS_SERVER ~]$  netstat | grep ESTABLISHED | grep 64 | grep 144 | wc
           27     162    2403
      [ID@MONGOS_SERVER ~]$  netstat | grep ESTABLISHED | grep 64 | grep 144 | wc
           27     162    2403
      

      However, when I use '"mongodb": "^2.2.35", it's normal after mongos restarted.

      [ID@MONGOS_SERVER ~]$ date
      Wed Apr 11 17:59:12 KST 2018
      [ID@MONGOS_SERVER ~]$  netstat | grep ESTABLISHED | grep 64 | grep 144 | wc
            7      42     623
      [ID@MONGOS_SERVER ~]$ pkill mongos
      [ID@MONGOS_SERVER ~]$ numactl --interleave=all mongos -f /workspace/db/config/mongos.conf &
      [1] 158835
      [ID@MONGOS_SERVER ~]$ about to fork child process, waiting until server is ready for connections.
      forked process: 158837
      
      [ID@MONGOS_SERVER ~]$ child process started successfully, parent exiting
      
      [1]+  Done                    numactl --interleave=all mongos -f /workspace/db/config/mongos.conf
      [ID@MONGOS_SERVER ~]$  netstat | grep ESTABLISHED | grep 64 | grep 144 | wc
            0       0       0
      [ID@MONGOS_SERVER ~]$  netstat | grep ESTABLISHED | grep 64 | grep 144 | wc
            7      42     623
      [ID@MONGOS_SERVER ~]$  netstat | grep ESTABLISHED | grep 64 | grep 144 | wc
            7      42     623
      [ID@MONGOS_SERVER ~]$ date
      Wed Apr 11 17:59:52 KST 2018
      [ID@MONGOS_SERVER ~]$ pkill mongos
      [ID@MONGOS_SERVER ~]$
      [ID@MONGOS_SERVER ~]$ numactl --interleave=all mongos -f /workspace/db/config/mongos.conf &
      [1] 159900
      [ID@MONGOS_SERVER ~]$ about to fork child process, waiting until server is ready for connections.
      forked process: 159902
      
      [ID@MONGOS_SERVER ~]$ child process started successfully, parent exiting
      
      [1]+  Done                    numactl --interleave=all mongos -f /workspace/db/config/mongos.conf
      [ID@MONGOS_SERVER ~]$
      [ID@MONGOS_SERVER ~]$  netstat | grep ESTABLISHED | grep 64 | grep 144 | wc
            0       0       0
      [ID@MONGOS_SERVER ~]$  netstat | grep ESTABLISHED | grep 64 | grep 144 | wc
            6      36     534
      [ID@MONGOS_SERVER ~]$  netstat | grep ESTABLISHED | grep 64 | grep 144 | wc
            7      42     623
      [ID@MONGOS_SERVER ~]$ date
      Wed Apr 11 18:00:11 KST 2018
      

            Assignee:
            daniel.aprahamian@mongodb.com Daniel Aprahamian (Inactive)
            Reporter:
            iknowchang Chang Yul
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: