The problem appears when doing a sequence of operations 'repairDatabase', 'dropCollection', 'createCollection'. The collection created is a capped collection with the same name but with different size ranging from 100MB to 500MB.
After several attempts on chaning the size of a capped collection and doing a 'repairDatabase' before each attempt, MongoDb server terminates and the following error appears in the log file:
MapViewOfFileEx for ../data/$tmp_repairDatabase_0/sbm.1 failed with errno:8 Not enough storage is available to process this command. (file size is 536870912) in MemoryMappedFile::map, terminating
The following command is used to start the server:
mongod.exe --dbpath ..\data -vvvvvv --logpath ..\log\server.log
Here is the state of database files in data directory after crash:
$tmp_repairDatabase_0 (dir) $tmp_repairDatabase_0\sbm.0 (16.0 MB (16,777,216 bytes)) $tmp_repairDatabase_0\sbm.1 (512 MB (536,870,912 bytes)) $tmp_repairDatabase_0\sbm.ns (16.0 MB (16,777,216 bytes)) _tmp (dir, empty) sbm (dir, empty) admin.0 (16.0 MB (16,777,216 bytes)) admin.ns (1.00 MB (1,048,576 bytes)) mongod.lock (5 bytes (5 bytes)) sbm.0 (16.0 MB (16,777,216 bytes)) sbm.1 (512 MB (536,870,912 bytes)) sbm.2 (512 MB (536,870,912 bytes)) sbm.ns (16.0 MB (16,777,216 bytes))