title: MongoDB is not reporting to close connections
body: <p>I am running through the <a href="https://docs.mongodb.org/getting-started/node/insert/" rel="nofollow">getting started tutorial</a> to evaluate MongoDB for use in production.</p>
  
  <p>Tailing the server logs it showed the following: in the last 5 lines <code>mongod</code> reports it is closing connections but the count for the number of connections open is not decreasing.  Is this expected behaviour?</p>
  
  <pre><code>$ tail -f /usr/local/var/log/mongodb/mongo.log
  2015-11-29T15:10:13.425+0000 I JOURNAL  [journal writer] Journal writer thread started
  2015-11-29T15:10:13.425+0000 I CONTROL  [initandlisten] MongoDB starting : pid=86710 port=27017 dbpath=/usr/local/var/mongodb 64-bit host=As-MacBook-Air.local
  2015-11-29T15:10:13.425+0000 I CONTROL  [initandlisten] 
  2015-11-29T15:10:13.425+0000 I CONTROL  [initandlisten] ** WARNING: soft rlimits too low. Number of files is 256, should be at least 1000
  2015-11-29T15:10:13.425+0000 I CONTROL  [initandlisten] db version v3.0.7
  2015-11-29T15:10:13.425+0000 I CONTROL  [initandlisten] git version: nogitversion
  2015-11-29T15:10:13.425+0000 I CONTROL  [initandlisten] build info: Darwin As-MacBook-Air.local 13.4.0 Darwin Kernel Version 13.4.0: Wed Mar 18 16:20:14 PDT 2015; root:xnu-2422.115.14~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49
  2015-11-29T15:10:13.425+0000 I CONTROL  [initandlisten] allocator: system
  2015-11-29T15:10:13.425+0000 I CONTROL  [initandlisten] options: { config: "/usr/local/etc/mongod.conf", net: { bindIp: "127.0.0.1" }, storage: { dbPath: "/usr/local/var/mongodb" }, systemLog: { destination: "file", logAppend: true, path: "/usr/local/var/log/mongodb/mongo.log" } }
  2015-11-29T15:10:13.435+0000 I NETWORK  [initandlisten] waiting for connections on port 27017
  2015-11-29T15:14:21.158+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:52667 #1 (1 connection now open)
  2015-11-29T15:14:21.169+0000 I NETWORK  [conn1] end connection 127.0.0.1:52667 (0 connections now open)
  2015-11-29T15:14:21.175+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:52668 #2 (1 connection now open)
  2015-11-29T15:14:21.176+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:52669 #3 (2 connections now open)
  2015-11-29T15:14:21.176+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:52670 #4 (3 connections now open)
  2015-11-29T15:14:21.176+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:52671 #5 (4 connections now open)
  2015-11-29T15:14:21.179+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:52672 #6 (5 connections now open)
  2015-11-29T15:14:21.183+0000 I NETWORK  [conn2] end connection 127.0.0.1:52668 (4 connections now open)
  2015-11-29T15:14:21.184+0000 I NETWORK  [conn3] end connection 127.0.0.1:52669 (3 connections now open)
  2015-11-29T15:14:21.184+0000 I NETWORK  [conn4] end connection 127.0.0.1:52670 (2 connections now open)
  2015-11-29T15:14:21.184+0000 I NETWORK  [conn5] end connection 127.0.0.1:52671 (1 connection now open)
  2015-11-29T15:14:21.184+0000 I NETWORK  [conn6] end connection 127.0.0.1:52672 (0 connections now open)
  2015-11-29T15:25:39.136+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:52799 #7 (1 connection now open)
  2015-11-29T15:25:39.137+0000 I NETWORK  [conn7] end connection 127.0.0.1:52799 (0 connections now open)
  2015-11-29T15:25:39.142+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:52800 #8 (1 connection now open)
  2015-11-29T15:25:39.142+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:52801 #9 (2 connections now open)
  2015-11-29T15:25:39.144+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:52802 #10 (3 connections now open)
  2015-11-29T15:25:39.144+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:52803 #11 (4 connections now open)
  2015-11-29T15:25:39.145+0000 I NETWORK  [initandlisten] connection accepted from 127.0.0.1:52804 #12 (5 connections now open)
  2015-11-29T15:25:39.153+0000 I INDEX    [conn9] allocating new ns file /usr/local/var/mongodb/test.ns, filling with zeroes...
  2015-11-29T15:25:39.209+0000 I STORAGE  [FileAllocator] allocating new datafile /usr/local/var/mongodb/test.0, filling with zeroes...
  2015-11-29T15:25:39.209+0000 I STORAGE  [FileAllocator] creating directory /usr/local/var/mongodb/_tmp
  2015-11-29T15:25:39.328+0000 I STORAGE  [FileAllocator] done allocating datafile /usr/local/var/mongodb/test.0, size: 64MB,  took 0.118 secs
  2015-11-29T15:25:39.374+0000 I WRITE    [conn9] insert test.restaurants query: { address: { street: "2 Avenue", zipcode: "10075", building: "1480", coord: [ -73.9557413, 40.7720266 ] }, borough: "Manhattan", cuisine: "Italian", grades: [ { date: new Date(1412121600000), grade: "A", score: 11 }, { date: new Date(1389830400000), grade: "B", score: 17 } ], name: "Vella", restaurant_id: "41704620", _id: ObjectId('565b18f333b46874536e90de') } ninserted:1 keyUpdates:0 writeConflicts:0 numYields:0 locks:{ Global: { acquireCount: { r: 2, w: 2 } }, MMAPV1Journal: { acquireCount: { w: 8 }, acquireWaitCount: { w: 1 }, timeAcquiringMicros: { w: 179 } }, Database: { acquireCount: { w: 1, W: 1 } }, Collection: { acquireCount: { W: 1 } }, Metadata: { acquireCount: { W: 4 } } } 221ms
  2015-11-29T15:25:39.374+0000 I COMMAND  [conn9] command test.$cmd command: insert { insert: "restaurants", documents: [ { address: { street: "2 Avenue", zipcode: "10075", building: "1480", coord: [ -73.9557413, 40.7720266 ] }, borough: "Manhattan", cuisine: "Italian", grades: [ { date: new Date(1412121600000), grade: "A", score: 11 }, { date: new Date(1389830400000), grade: "B", score: 17 } ], name: "Vella", restaurant_id: "41704620", _id: ObjectId('565b18f333b46874536e90de') } ], ordered: true } keyUpdates:0 writeConflicts:0 numYields:0 reslen:40 locks:{ Global: { acquireCount: { r: 2, w: 2 } }, MMAPV1Journal: { acquireCount: { w: 8 }, acquireWaitCount: { w: 1 }, timeAcquiringMicros: { w: 179 } }, Database: { acquireCount: { w: 1, W: 1 } }, Collection: { acquireCount: { W: 1 } }, Metadata: { acquireCount: { W: 4 } } } 221ms
  2015-11-29T15:25:39.384+0000 I NETWORK  [conn8] end connection 127.0.0.1:52800 (4 connections now open)
  2015-11-29T15:25:39.384+0000 I NETWORK  [conn9] end connection 127.0.0.1:52801 (4 connections now open)
  2015-11-29T15:25:39.384+0000 I NETWORK  [conn10] end connection 127.0.0.1:52802 (3 connections now open)
  2015-11-29T15:25:39.385+0000 I NETWORK  [conn11] end connection 127.0.0.1:52803 (2 connections now open)
  2015-11-29T15:25:39.385+0000 I NETWORK  [conn12] end connection 127.0.0.1:52804 (2 connections now open)
  </code></pre>
  
  <p>I started the MongoDB server with:</p>
  
  <pre><code>$ mongod --config /usr/local/etc/mongod.conf
  </code></pre>
  
  <p>Other details:</p>
  
  <pre><code>$ sw_vers
  ProductName:    Mac OS X
  ProductVersion: 10.9.5
  BuildVersion:   13F1096
  $ mongod -version
  db version v3.0.7
  git version: nogitversion
  $ cat /usr/local/etc/mongod.conf
  systemLog:
    destination: file
    path: /usr/local/var/log/mongodb/mongo.log
    logAppend: true
  storage:
    dbPath: /usr/local/var/mongodb
  net:
    bindIp: 127.0.0.1
  </code></pre>