doxel / doxel-loopback

Backend for the DOXEL project
Other
1 stars 0 forks source link

mongodb timeout on application startup #16

Closed bugdanov closed 5 years ago

bugdanov commented 7 years ago

Timeout occurs often during the call to Role.findOrCreat() in create-role-and-users.js on worker startup, fortunately, the worker is restarted by strong-pm until it's ok...

https://github.com/doxel/doxel-loopback/blob/0bebbd1ad53bd59a00fbb04121b2ea794df133df/server/boot/create-roles-and-users.js#L50

Error: Timeout in connecting after 5000 ms
at Timeout._onTimeout (/src/doxel-loopback/node_modules/loopback-datasource-juggler/lib/datasource.js:2319:10)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)