I have hosted my mongodb in mongolab. I have created a ODM in loopback and made a connection to mongolab. Sometimes the connection gets established but other times due to bad connection it gets timedout. I want to increase this timeout so that it does get connected everytime. I did not find any solution even on Strongloop site.
I tried even adding a query string param in connection string for mongolab: ?connectTimeoutMS=1000000 Even this did not help.
Use the connectionTimeout setting in your dataSources.json file.
{
"YourMongoDB": {
"name": "YourMongoDB",
"connector": "mongodb",
"connectionTimeout": 1000000
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With