Hello! We have a problem with our MongoDB service, that crashes constantly after running a short or very short period. It is running on windows server with 16Gb of Ram (which does not seem to be saturated). The error is the following :
Anecdotally, I’ve seen a similar error message when MongoDB is running inside a Docker environment. There was an issue where older versions of MongoDB would detect the system’s RAM instead of the container’s RAM, and would be stopped from acquiring memory. Since this situation is outside of WiredTiger’s control (requesting memory but refused by the OS), it will raise an exception similar to this one. This was fixed in SERVER-16571.
If you’re not using the latest supported version of MongoDB, could you try again with the latest version and see if this is still happening?
If this still happens, could you post your MongoDB version, your deployment environment, and steps that can reliably produce this error?
Hello! If it can help others, here is what we did to avoid this MongoDB service crash. In the advanced system settings, we have allowed the system to create a paging file for the virtual memory when needed. It seems that the crash were happening when no more Virtual Memory was available for the system. In that case, the system was not allowed to swap on the disk, and Mongo DB was stopped when failing to allocate memory. I must say that we are not 100% sure whether it is the true reason why the problem happened, neither if this solution will fix it definately… But, since that change in the settings, it works fine, without any impact on the system performances. No more issue for the last month (when it used to happen several times a day before the fix). Here is a screenshot to explain what has been done :
PS: If our conclusion is right (crash due to lack of virtual memory) this behaviour of MongoDB would be worth being changed in a future release. It would be better to downgrade a bit the performances the time virtual memory is released, rather than crashing the system.