diff --git a/readme.md b/readme.md index 209a6356b..3be3b21f7 100644 --- a/readme.md +++ b/readme.md @@ -263,6 +263,19 @@ If you're using mongoDB you will need to add a database to your app: heroku addons:add mongohq +Note: if you get an `Error: No valid replicaset instance servers found` you need to modify moongose connection options in config/environment/production.js as follows: +``` +options: { + db: { + safe: true, + replset: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } }, + server: { socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 } } + } + } +``` +One of the odd things about the Node driver is that the default timeout for replica set connections is only 1 second, so make sure you're setting it to something more like 30s like in this example. + + Your app should now be live. To view it run `heroku open`. >