Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-21595

Connection bookkeeping appears incorrect

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Networking
    • None
    • ALL

      Using

      db version v3.2.0-rc3-75-g5b3257d
      git version: 5b3257d526f8217e303609418da1769275f81d03
      allocator: system
      modules: none
      build environment:
          distarch: x86_64
          target_arch: x86_64

      on OSX 10.10.5

      I run a couple of tests which open and close connections and observe this in the logs:

      2015-11-20T14:42:07.468-0500 I NETWORK  [conn73] end connection 127.0.0.1:51290 (48 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn74] end connection 127.0.0.1:51291 (47 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn72] end connection 127.0.0.1:51289 (46 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn70] end connection 127.0.0.1:51287 (45 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn68] end connection 127.0.0.1:51285 (44 connections now open)
      2015-11-20T14:42:07.470-052015-11-20T14:42:07.470-0500 I NETWORK  [conn64] end connection 127.0.0.1:51280 (43 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn63] end connection 127.0.0.1:51279 (43 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn61] end connection 127.0.0.1:51277 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn62] end connection 127.0.0.1:51278 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn59] end connection 127.0.0.1:51275 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn60] end connection 127.0.0.1:51276 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn58] end connection 127.0.0.1:51274 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn57] end connection 127.0.0.1:51273 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn55] end connection 127.0.0.1:51271 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn56] end connection 127.0.0.1:51272 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn52] end connection 127.0.0.1:51268 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn54] end connection 127.0.0.1:51270 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn50] end connection 127.0.0.1:51266 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn48] end connection 127.0.0.1:51264 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn44] end connection 127.0.0.1:51260 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn46] end connection 127.0.0.1:51262 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn40] end connection 127.0.0.1:51256 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn42] end connection 127.0.0.1:51258 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn38] end connection 127.0.0.1:51254 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn36] end connection 127.0.0.1:51252 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn53] end connection 127.0.0.1:51269 (42 connections now open)
      2015-11-20T14:42:07.470-0500 I NETWORK  [conn34] end connection 127.0.0.1:51250 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn32] end connection 127.0.0.1:51248 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn31] end connection 127.0.0.1:51247 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn29] end connection 127.0.0.1:51245 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn28] end connection 127.0.0.1:51244 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn25] end connection 127.0.0.1:51241 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn26] end connection 127.0.0.1:51242 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn23] end connection 127.0.0.1:51239 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn22] end connection 127.0.0.1:51238 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn19] end connection 127.0.0.1:51235 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn20] end connection 127.0.0.1:51236 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn17] end connection 127.0.0.1:51233 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn18] end connection 127.0.0.1:51234 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn14] end connection 127.0.0.1:51230 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn16] end connection 127.0.0.1:51232 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn12] end connection 127.0.0.1:51228 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn10] end connection 127.0.0.1:51226 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn8] end connection 127.0.0.1:51224 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn6] end connection 127.0.0.1:51222 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn2] end connection 127.0.0.1:51218 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn4] end connection 127.0.0.1:51220 (42 connections now open)
      2015-11-20T14:42:07.471-0500 I NETWORK  [conn15] end connection 127.0.0.1:51231 (42 connections now open)
      ^C2015-11-20T14:45:10.987-0500 I CONTROL  [signalProcessingThread] got signal 2 (Interrupt: 2), will terminate after current cmd ends
      2015-11-20T14:45:10.987-0500 I FTDC     [signalProcessingThread] Shuting down full-time diagnostic data capture
      2015-11-20T14:45:10.988-0500 I CONTROL  [signalProcessingThread] now exiting
      2015-11-20T14:45:10.988-0500 I NETWORK  [signalProcessingThread] shutdown: going to close listening sockets...
      2015-11-20T14:45:10.988-0500 I NETWORK  [signalProcessingThread] closing listening socket: 5
      2015-11-20T14:45:10.988-0500 I NETWORK  [signalProcessingThread] closing listening socket: 6
      2015-11-20T14:45:10.988-0500 I NETWORK  [signalProcessingThread] removing socket file: /tmp/mongodb-27017.sock
      2015-11-20T14:45:10.988-0500 I NETWORK  [signalProcessingThread] shutdown: going to flush diaglog...
      2015-11-20T14:45:10.988-0500 I NETWORK  [signalProcessingThread] shutdown: going to close sockets...
      2015-11-20T14:45:10.988-0500 I STORAGE  [signalProcessingThread] shutdown: waiting for fs preallocator...
      2015-11-20T14:45:10.988-0500 I STORAGE  [signalProcessingThread] shutdown: final commit...
      2015-11-20T14:45:10.996-0500 I JOURNAL  [signalProcessingThread] journalCleanup...
      2015-11-20T14:45:10.996-0500 I JOURNAL  [signalProcessingThread] removeJournalFiles
      2015-11-20T14:45:10.997-0500 I JOURNAL  [signalProcessingThread] Terminating durability thread ...
      2015-11-20T14:45:11.101-0500 I JOURNAL  [journal writer] Journal writer thread stopped
      2015-11-20T14:45:11.101-0500 I JOURNAL  [durability] Durability thread stopped
      2015-11-20T14:45:11.101-0500 I STORAGE  [signalProcessingThread] shutdown: closing all files...
      2015-11-20T14:45:11.106-0500 I STORAGE  [signalProcessingThread] closeAllFiles() finished
      2015-11-20T14:45:11.106-0500 I STORAGE  [signalProcessingThread] shutdown: removing fs lock...
      2015-11-20T14:45:11.106-0500 I CONTROL  [signalProcessingThread] dbexit:  rc: 0

      Note that even though all connections have been closed, mongod thinks there are still 42 open connections.

            Assignee:
            Unassigned Unassigned
            Reporter:
            adinoyi.omuya@mongodb.com Adinoyi Omuya
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: