Nodejs错误:uncaughtException:连接超时。重命名发生

时间:2016-10-04 14:41:20

标签: node.js mongodb docker mongoose mlab

我使用的是nodejs版本4.2.0,mongoose 4.4.7,mongodb 3.2.9(我使用的是mlab)。该应用程序在docker镜像上运行。我随机收到此错误。由于此错误,服务器崩溃,直到我重新启动它才恢复。对此有一些指导。提前谢谢。

2016-10-01T05:09:22.915Z - error: uncaughtException: connection timeout date=Sat Oct 01 2016 05:09:22 GMT+0000 (UTC), pid=60, uid=0, gid=0, cwd=/usr/src/app, execPath=/usr/local/bin/node, version=v4.4.7, argv=[/usr/local/bin/node, /usr/src/app/index.js], rss=69316608, heapTotal=44601440, heapUsed=33179840, loadavg=[0.07080078125, 0.19287109375, 0.13037109375], uptime=21152513, trace=[column=17, file=/usr/src/app/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js, function=, line=168, method=null, native=false, column=13, file=events.js, function=emitTwo, line=87, method=null, native=false, column=7, file=events.js, function=emit, line=172, method=null, native=false, column=14, file=/usr/src/app/node_modules/mongoose/node_modules/mongodb/lib/db.js, function=listener, line=1791, method=null, native=false, column=13, file=events.js, function=emitOne, line=77, method=null, native=false, column=7, file=events.js, function=emit, line=169, method=null, native=false, column=14, file=/usr/src/app/node_modules/mongoose/node_modules/mongodb/lib/server.js, function=, line=270, method=null, native=false, column=16, file=events.js, function=g, line=260, method=null, native=false, column=13, file=events.js, function=emitOne, line=77, method=null, native=false, column=7, file=events.js, function=emit, line=169, method=null, native=false, column=12, file=/usr/src/app/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js, function=, line=322, method=null, native=false, column=13, file=events.js, function=emitOne, line=77, method=null, native=false, column=7, file=events.js, function=emit, line=169, method=null, native=false, column=12, file=/usr/src/app/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js, function=, line=260, method=null, native=false, column=16, file=events.js, function=g, line=260, method=null, native=false, column=13, file=events.js, function=emitTwo, line=87, method=null, native=false, column=7, file=events.js, function=emit, line=172, method=null, native=false], stack=[Error: connection timeout, at null.<anonymous> (/usr/src/app/node_modules/mongoose/lib/drivers/node-mongodb-native/connection.js:168:17), at emitTwo (events.js:87:13), at emit (events.js:172:7), at listener (/usr/src/app/node_modules/mongoose/node_modules/mongodb/lib/db.js:1791:14), at emitOne (events.js:77:13), at emit (events.js:169:7), at null.<anonymous> (/usr/src/app/node_modules/mongoose/node_modules/mongodb/lib/server.js:270:14), at g (events.js:260:16), at emitOne (events.js:77:13), at emit (events.js:169:7), at null.<anonymous> (/usr/src/app/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:322:12), at emitOne (events.js:77:13), at emit (events.js:169:7), at null.<anonymous> (/usr/src/app/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/connection/pool.js:260:12), at g (events.js:260:16), at emitTwo (events.js:87:13), at emit (events.js:172:7)] [nodemon] app crashed - waiting for file changes before starting...

0 个答案:

没有答案