为什么已经运行过一次(从未加载过)的Meteor应用程序的数据库占用了近3GB? [英] Why is the database of a Meteor app that has been run once (and never loaded) taking up nearly 3GB?
问题描述
更新:此问题在Meteor v0.4(2012)之后已得到修复.出于历史目的:
UPDATE: this was fixed after Meteor v0.4 (2012). For historical purposes:
摘录自du
:
2890768 ./Code/Meteor/QuarterTo/.meteor/local/db/journal
2890772 ./Code/Meteor/QuarterTo/.meteor/local/db
2890776 ./Code/Meteor/QuarterTo/.meteor/local
2890788 ./Code/Meteor/QuarterTo/.meteor
2890804 ./Code/Meteor/QuarterTo
我只是问,因为它在我的保管箱中,使我超出了极限.
I merely ask because it was in my Dropbox and pushed me over my limit.
推荐答案
执行meteor run
时,它将使用默认mongo设置启动mongodb,因此它将在.meteor/local/db/journal
中创建(大量)预分配文件.
When meteor run
is executed, it starts mongodb with default mongo settings, so it creates (massive) prealloc files in .meteor/local/db/journal
.
没有明显的方法可以禁用此行为.作为解决方法,我要做的是更改文件app/lib/mongo_runner.js
并添加一个--nojournal
参数,该参数在启动时传递给mongodb.
There is no obvious way to disable this behavior. What I have done as a workaround is change the file app/lib/mongo_runner.js
and add a --nojournal
parameter that gets passed to mongodb at startup.
我为此创建了一个问题: https://github.com/meteor/meteor/issues /15
I created an issue for this: https://github.com/meteor/meteor/issues/15
这篇关于为什么已经运行过一次(从未加载过)的Meteor应用程序的数据库占用了近3GB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!