8

I'm running version 3.4 of mongo on a windows server 2012 R2 using the default storage engine (Wired Tiger). The mongod is running as a Windows Service.

Unfortunatlly the service crushes from time to time with a "out of memory" error. this is from the 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.

After some research, people suggest to limit the memory usage:

  1. Using WSRM (https://www.captaincodeman.com/2011/02/27/limit-mongodb-memory-use-windows) Unfortunatlly this feature is currently not available on windows 2012 server.
  2. Running the mongod inside a special container or a virtual machine (Heper-V /Vmware...) in order to limit its resources - I guess that the probelm will return in the Virtual machine - the process will be out of memory there.
  3. Limiting the WiredTiger cache size (https://docs.mongodb.com/manual/faq/storage/#to-what-size-should-i-set-the-wiredtiger-cache) - I already decreased the size to be 1 Gb and it doesn't help. Besides it, it only limits the cache, the mongod process itself can the RAM in other way.

-I saw that in the linux version there are "unlimit" flags that can be set MongoDB: out of memory

-Is there similar configurations in windows versions?

-Is increasing the page file size can help?

-Other suggestions?

Thanks!

Community
  • 1
  • 1
sborpo
  • 928
  • 7
  • 15
  • what is the RAM size? what is the database size? is there other apps running in same machine? – R2D2 Jan 24 '21 at 02:12

0 Answers0