I use node.js, mongodb, mongoose 2.3 for my app.
I have following code:
console.log(config);
db = mongoose.connect(
config[MONGO_HOST_CONFIG],
config[MONGO_ACCOUNTS_DB_CONFIG],
config[MONGO_PORT_CONFIG],
function(err) {
if (err) throw err;
}
);
Config looks like:
{ 'mongo.host': 'google.com',
'mongo.port': '27',
'mongo.accounts.db': 'accounts',
'mongo.sessions.db': 'sessions' }
It times out after some time. Question: How do I find out the timeout interval?
If I change HOST to: example.com: It fails immediately which is good.
If I change host to aruunt.com, it never times out and goes into wait state. The connection is also not established. aruunt.com is some random domain owned by me.
What is the issue here?
Default driver is never to timeout or whatever is the os default timeout (I think it's 30 min on linux bot not completely sure). You can tweak it yourself as the link above show. But don't set it to small or you'll continuously get timeouts and reconnects