[SERVER-8162] MapViewOfFileEx for [datafile] failed with errno:8 Not enough storage Created: 14/Jan/13  Updated: 10/Dec/14  Resolved: 13/Aug/13

Status: Closed
Project: Core Server
Component/s: Stability
Affects Version/s: 2.2.0
Fix Version/s: None

Type: Bug Priority: Critical - P2
Reporter: Samuel Peilow Assignee: Tad Marshall
Resolution: Done Votes: 0
Labels: crash
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Windows Server, 32bit with 4GB memory. Running MongoDB 2.2.0


Issue Links:
Related
Operating System: Windows
Steps To Reproduce:

Unknown.

Participants:

 Description   

Our MongoDB service went down recently, with the following error in the log:

MapViewOfFileEx for M:/MongoDB/data/xxxx.7 failed with errno:8 Not enough storage is available to process this command. (file size is 536608768) in MemoryMappedFile::map
Fri Dec 21 19:55:24 [conn3914719] xx.yy Fatal Assertion 16166
***aborting after fassert() failure

We have a batch job that clears out the collection every night, and we do not seem to have had a spike in usage, (although the datafiles were cleared up by the team that got the service running again, so can't be sure!).

The service was in the bad state after crashing and could not simply be restarted.

This error seems to have been reported in previous tickets, (eg. SERVER-5244), however it is recorded as fixed in version 2.1.1.



 Comments   
Comment by Tad Marshall [ 14/Jan/13 ]

Hi Samuel,

The issue that was fixed for SERVER-5244 was primarily about our regression tests failing, and most of the work that was done to fix that problem was on the regression tests themselves.

Unfortunately, there is not much we can do to prevent a 32-bit version of mongod.exe from running out of address space, which is what error 8: "Not enough storage is available to process this command." is reporting. Your best solution is to switch to the 64-bit version of mongod.exe.

Version 2.2.0 Windows executables for mongodb have the LARGEADDRESSAWARE flag set in the executable header. This means that on a 64-bit OS, Windows will provide close to 4 GB of user-mode address space to mongod.exe rather than the 2 GB that would be provided if LARGEADDRESSAWARE was not set. For 32-bit OS versions, the LARGEADDRESSAWARE setting also means that you can use the /3GB or increaseuserva options (depending on which version of Windows you are using) to increase the amount of user-mode address space to 3 GB. Changing this OS setting will affect applications other than MongoDB as well, so it may require testing to make sure that it works for everything you are running.

See http://msdn.microsoft.com/en-us/library/windows/desktop/bb613473(v=vs.85).aspx for information about the 4-Gigabyte Tuning option.

Tad

Generated at Thu Feb 08 03:16:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.