我正在使用默认存储引擎(有线老虎)在Windows Server 2012 R2上运行mongo 3.4版。 mongod作为Windows服务运行。
不幸的是,该服务不时会因“内存不足”错误而崩溃。 这是来自mongolog:
2017-05-14T22:34:15.888+0000 I CONTROL [ftdc] mongod.exe
...\src\mongo\util\stacktrace_windows.cpp(239)
mongo::printStackTrace+0x43
2017-05-14T22:34:15.888+0000 I CONTROL [ftdc] mongod.exe
???
2017-05-14T22:34:15.896+0000 I CONTROL [ftdc] mongod.exe
...\src\mongo\util\allocator.cpp(51) ???
2017-05-14T22:34:15.896+0000 I CONTROL [ftdc] mongod.exe
???
2017-05-14T22:34:15.896+0000 I CONTROL [ftdc] mongod.exe
???
2017-05-14T22:34:15.896+0000 I CONTROL [ftdc] mongod.exe
???
2017-05-14T22:34:15.896+0000 I CONTROL [ftdc] mongod.exe
???
2017-05-14T22:34:15.896+0000 I CONTROL [ftdc] mongod.exe
???
2017-05-14T22:34:15.896+0000 I CONTROL [ftdc] mongod.exe
???
2017-05-14T22:34:15.896+0000 I CONTROL [ftdc] mongod.exe
???
2017-05-14T22:34:15.902+0000 I CONTROL [ftdc] ucrtbase.DLL
crt_at_quick_exit+0x7d
2017-05-14T22:34:15.902+0000 I CONTROL [ftdc] KERNEL32.DLL
BaseThreadInitThunk+0x22
2017-05-14T22:34:15.902+0000 F - [ftdc] out of memory.
经过一番研究,人们建议限制内存使用量:
- 我看到linux版本中有“unlimit”标志可以设置MongoDB: out of memory
- Windows版本中有类似的配置吗?
- 增加页面文件大小有帮助吗?
- 其他建议?
谢谢!