Make MongoDB work for production
I have made a simple test of MongoDB under windows environment. The single collection of objects with ID (int32) and Buffer (byte[4096]) was filling sequentially. After reaching of almost 15G (of 16G total) RAM, environment becames glitching. Some apps were killed, desktop changed its resolution, then i开发者_如何学编程t completely hangs. After hard reboot I've found a lot of such records in mongo log:
VirtualProtect failed (mcw) e:/Databases/+MongoDB/TestFS/TestFS.7 256400000000 4000000 errno:1455 The paging file is too small for this operation to complete.
MapViewOfFile failed e:/Databases/+MongoDB/TestFS/TestFS.26 errno:1450 Insufficient system resources exist to complete the requested service.
Also, MongoDB failed to connect anymore (to any database). Journaling was enabled. No any errors in log. I was able to heal it only by deleting the journal and corrupted database. That's far from the behaviour I'd like to see in production, but I know, that there is a lot of production installations existing. So I'm trying to understand, what have I missed or doing wrong.
perhaps this is same question: MongoDB replication crashes and wouldn't start up again
answers from link:
try to increase your virtual memory
and this seems like a known bug: https://jira.mongodb.org/browse/SERVER-10044
精彩评论