title: Meteor app crash randomly throwing a 'MongoError: server instance pool was destroyed' error
body: <p>I deployed a meteor app to an AWS server using <code>mup</code> which used <code>docker</code> to deploy the app. I also used mLab sandboxed db.</p>
  
  <p>The issue is, the app crashes without warning after some time. Crashing means the app still works but data won't load from the database. I have two versions of the app (staging and production) running in two different servers. But both have this issue. In the docker logs I see this error repeated a lot of times :</p>
  
  <pre><code>Exception in setInterval callback: MongoError: server instance pool was destroyed
      at Object.Future.wait (/bundle/bundle/programs/server/node_modules/fibers/future.js:446:16)
      at MongoConnection.&lt;anonymous&gt; (packages/meteor/helpers.js:119:1)
      at MongoConnection.(anonymous function) [as update] (packages/mongo/mongo_driver.js:771:49)
      at [object Object].update (packages/mongo/collection.js:589:29)
      at AccountsServer.Ap._expireTokens (packages/accounts-base/accounts_server.js:1100:14)
      at packages/accounts-base/accounts_server.js:1173:14
      at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
      at packages/meteor/timers.js:6:1
      at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1)
      - - - - -
      at Function.MongoError.create (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:29:11)
      at basicWriteValidations (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/server.js:433:51)
      at [object Object].Server.update (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/server.js:543:16)
      at [object Object].Server.update (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/server.js:386:17)
      at updateDocuments (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1037:19)
      at [object Object].Collection.update (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1075:44)
      at MongoConnection._update (packages/mongo/mongo_driver.js:560:18)
      at MongoConnection.&lt;anonymous&gt; (packages/meteor/helpers.js:118:1)
      at MongoConnection.(anonymous function) [as update] (packages/mongo/mongo_driver.js:771:49)
      at [object Object].update (packages/mongo/collection.js:589:29)
  </code></pre>
  
  <p>Any idea what's happening?</p>
  
  <p>In the client browser console, I see this error:</p>
  
  <blockquote>
    <p>WebSocket connection to 'wss://oursite.com/sockjs/373/2lrpal10/websocket' failed: WebSocket is closed before the connection is established.</p>
  </blockquote>