我使用mup
使用docker
部署应用程序,将meteor应用程序部署到AWS服务器。我也使用了mLab沙盒db。
问题是,应用程序在一段时间后会在没有警告的情况下崩溃。崩溃意味着应用程序仍然有效,但数据不会从数据库加载。我有两个版本的应用程序(登台和生产)在两个不同的服务器上运行。但两者都有这个问题。在docker日志中,我发现此错误重复了很多次:
Exception in setInterval callback: MongoError: server instance pool was destroyed
at Object.Future.wait (/bundle/bundle/programs/server/node_modules/fibers/future.js:446:16)
at MongoConnection.<anonymous> (packages/meteor/helpers.js:119:1)
at MongoConnection.(anonymous function) [as update] (packages/mongo/mongo_driver.js:771:49)
at [object Object].update (packages/mongo/collection.js:589:29)
at AccountsServer.Ap._expireTokens (packages/accounts-base/accounts_server.js:1100:14)
at packages/accounts-base/accounts_server.js:1173:14
at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)
at packages/meteor/timers.js:6:1
at runWithEnvironment (packages/meteor/dynamics_nodejs.js:110:1)
- - - - -
at Function.MongoError.create (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/error.js:29:11)
at basicWriteValidations (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/server.js:433:51)
at [object Object].Server.update (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb-core/lib/topologies/server.js:543:16)
at [object Object].Server.update (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/server.js:386:17)
at updateDocuments (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1037:19)
at [object Object].Collection.update (/bundle/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/collection.js:1075:44)
at MongoConnection._update (packages/mongo/mongo_driver.js:560:18)
at MongoConnection.<anonymous> (packages/meteor/helpers.js:118:1)
at MongoConnection.(anonymous function) [as update] (packages/mongo/mongo_driver.js:771:49)
at [object Object].update (packages/mongo/collection.js:589:29)
知道发生了什么事吗?
在客户端浏览器控制台中,我看到此错误:
与'wss://oursite.com/sockjs/373/2lrpal10/websocket'的WebSocket连接失败:在建立连接之前WebSocket已关闭。
答案 0 :(得分:3)
更新npm-mongo和mongo为我解决了这个问题。
meteor update --all-packages