In the mongodb.log file can see error when the problem occurs:
2020-03-05T16:00:37.160+0000 I CONTROL [conn11] mongod.exe ...\src\mongo\util\signal_handlers_synchronous.cpp(361) mongo::reportOutOfMemoryErrorAndExit+0x90
This is for MongoDB v3.6.14 but could occur for other versions also