MongoDB is stopping unexpectedly and randomly
Description
Cause

MongoDb process is running out of process memory

Resolution
CAUTION: Use caution when working with the below product functionality. Always create a backup of your data before proceeding with advanced solutions. If necessary, seek the assistance of a qualified Sage business partner, network administrator, or Sage customer support analyst.

There are two config file settings that could reduce or eliminate the memory footprint of MongoDB, at the expense of a slight performance degradation.

https://www.mongodb.com/docs/v4.4/reference/configuration-options/#mongodb-setting-storage.wiredTiger.engineConfig.cacheSizeGB
By default this would be 50% of (RAM - 1GB) so could be a large number

Possible mongodb.conf file change
storage:
wiredTiger:
engineConfig:
cacheSizeGB: 0.5

https://www.mongodb.com/docs/v4.4/reference/parameters/
Default is 10'000

Possible mongodb.conf file change
setParameter:
wiredTigerCursorCacheSize: 0

Steps to duplicate
Related Solutions

MongoDB is stopping unexpectedly and randomly