title: Mongodb takes 3 minutes to connect
body: <p>Just reinstalled Mongodb on my mac (fresh install of mountain lion 10.8) and now my apps are taking ~3 mins to connect.</p>
  
  <p>I put together a simple node script to test this:</p>
  
  <pre><code>var start = (new Date()).getTime();
  
  var mongoose = require('mongoose');
  
   var db = mongoose.connect('mongodb://localhost/passport-mongox',function(err){
    var stop = (new Date()).getTime();
  
    console.log('Took this long: ',(stop-start) / 1000 );
   });
  </code></pre>
  
  <p>Both times were 175.273 and 175.316 seconds.</p>
  
  <p>When I connect to an external, hosted mongodb it connects in less than a second,</p>
  
  <p>Any idea why this would happen? Here is my mongo.log:</p>
  
  <pre><code>Fri Feb  1 12:43:25 [initandlisten] MongoDB starting : pid=2262 port=27017 dbpath=/usr/local/var/mongodb 64-bit host=w
  Fri Feb  1 12:43:25 [initandlisten] db version v2.2.2, pdfile version 4.5
  Fri Feb  1 12:43:25 [initandlisten] git version: d1b43b61a5308c4ad0679d34b262c5af9d664267
  Fri Feb  1 12:43:25 [initandlisten] build info: Darwin bs-osx-106-x86-64-1.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun  7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_49
  Fri Feb  1 12:43:25 [initandlisten] options: { bind_ip: "127.0.0.1", config: "/usr/local/etc/mongod.conf", dbpath: "/usr/local/var/mongodb", logappend: "true", logpath: "/usr/local/var/log/mongodb/mongo.log" }
  Fri Feb  1 12:43:25 [initandlisten] journal dir=/usr/local/var/mongodb/journal
  Fri Feb  1 12:43:25 [initandlisten] recover : no journal files present, no recovery needed
  Fri Feb  1 12:43:26 [websvr] admin web console waiting for connections on port 28017
  Fri Feb  1 12:43:26 [initandlisten] waiting for connections on port 27017
  Fri Feb  1 12:44:05 [initandlisten] connection accepted from 127.0.0.1:52137 #1 (1 connection now open)
  Fri Feb  1 12:44:40 [initandlisten] connection accepted from 127.0.0.1:52152 #2 (2 connections now open)
  Fri Feb  1 12:45:15 [initandlisten] connection accepted from 127.0.0.1:52201 #3 (3 connections now open)
  Fri Feb  1 12:45:50 [initandlisten] connection accepted from 127.0.0.1:52298 #4 (4 connections now open)
  Fri Feb  1 12:46:25 [initandlisten] connection accepted from 127.0.0.1:52325 #5 (5 connections now open)
  Fri Feb  1 12:51:26 [conn5] end connection 127.0.0.1:52325 (4 connections now open)
  Fri Feb  1 12:51:26 [conn3] end connection 127.0.0.1:52201 (4 connections now open)
  Fri Feb  1 12:51:26 [conn4] end connection 127.0.0.1:52298 (4 connections now open)
  Fri Feb  1 12:51:26 [conn1] end connection 127.0.0.1:52137 (4 connections now open)
  Fri Feb  1 12:51:26 [conn2] end connection 127.0.0.1:52152 (4 connections now open)
  </code></pre>