crownstone / crownstone-cloud

Crownstone Cloud Service. Particular parts of Crownstone data (depending on user preferences) can be stored online. This makes it possible to remotely control devices, share your presence with friends, or store energy consumption over time.
https://cloud.crownstone.rocks/
Apache License 2.0
4 stars 6 forks source link

Add retry options #4

Closed mrquincle closed 7 years ago

mrquincle commented 7 years ago

Currently, when the database server fails the mongodb loopback connector does not default to any retries.

Add parameters to https://github.com/crownstone/crownstone-cloud/blob/master/server/datasources.production.js explicitly, such as:

"autoReconnect": true,
"reconnectTries": 60,
"reconnectInterval": 100

I don't know the exact fields by the way. At http://mongodb.github.io/node-mongodb-native/2.0/tutorials/connection_failures/ I see autoReconnect. The other ones might not exist or have different names.

Other source: http://mongodb.github.io/node-mongodb-native/core/tutorials/connecting/

I'm also not certain if these configuration values are picked up and passed properly. At https://github.com/strongloop/loopback-connector-mongodb/issues/333 they suggest that that is the case.

AlexDM0 commented 7 years ago

I've added it to our pivotal tracker