1

一个错误使我的应用程序服务器崩溃了,我似乎无法弄清楚是什么导致了这个问题。我的应用程序是用 Meteor 构建的,并托管在 modules.io 上。这是我的应用程序日志:

Error: no chunks found for file, possibly corrupt
    at /mnt/data/2/node_modules/mongodb/lib/mongodb/gridfs/gridstore.js:817:20
    at /mnt/data/2/node_modules/mongodb/lib/mongodb/gridfs/gridstore.js:594:7
    at /mnt/data/2/node_modules/mongodb/lib/mongodb/cursor.js:758:35
    at Cursor.close (/mnt/data/2/node_modules/mongodb/lib/mongodb/cursor.js:989:5)
    at Cursor.nextObject (/mnt/data/2/node_modules/mongodb/lib/mongodb/cursor.js:758:17)
    at commandHandler (/mnt/data/2/node_modules/mongodb/lib/mongodb/cursor.js:727:14)
    at /mnt/data/2/node_modules/mongodb/lib/mongodb/db.js:1916:9
    at Server.Base._callHandler (/mnt/data/2/node_modules/mongodb/lib/mongodb/connection/base.js:448:41)
    at /mnt/data/2/node_modules/mongodb/lib/mongodb/connection/server.js:481:18
    at [object Object].MongoReply.parseBody (/mnt/data/2/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
[2015-03-29T22:05:57.573Z] Application CRASH detected. Exit code 8.
4

2 回答 2

0

很可能这是gridfs 的一个 mongo 错误(已修复)

使用 GridStore.writeFile 命令从不同的节点进程同时写入两个或多个不同的文件会导致某些文件未正确写入(最终导致网格存储中出现许多损坏的文件)。即使所有 writeFile 调用都成功并且没有错误指示,也会导致文件损坏。writeFile 偶尔会因错误“块乱序”而失败,但这种情况很少发生(例如 1 个失败的 writeFile 用于 100 个或更多损坏的文件)。

根据讨论中的评论,如果您更新 mongo,问题将得到解决(应删除 gridfs 文件,因为它们已损坏)。

于 2015-03-29T22:39:07.283 回答
0
Error: no chunks found for file, possibly corrupt
at /home/developer/rundir/node_modules/mongoose/node_modules/mongodb/lib/mongodb/gridfs/gridstore.js:808:20
at /home/developer/rundir/node_modules/mongoose/node_modules/mongodb/lib/mongodb/gridfs/gridstore.js:586:5
at /home/developer/rundir/node_modules/mongoose/node_modules/mongodb/lib/mongodb/collection/query.js:164:5
at /home/developer/rundir/node_modules/mongoose/node_modules/mongodb/lib/mongodb/cursor.js:778:35

我也遇到过类似的情况,但最终在 GFS 读取流中寻找的文件实际上已被删除 - 所以在我的情况下,它并没有损坏,而是消失了!以上是那件事发生时的日志。

于 2016-04-29T03:08:50.507 回答