Article ID: 820108 - Last Review: May 16, 2007 - Revision: 2.3 You may receive the "System.OutOfMemoryException" error message when you view ASP.NET pages on a server that has 3 gigabytes of RAM
SYMPTOMSWhen you view ASP.NET pages on a server that has 3 gigabytes (GB) or more of RAM installed, you may receive the
following exception error message, regardless of whether there is still physical memory available on the
server: System.OutOfMemoryException CAUSEThe common language runtime throws an OutOfMemoryException error if
it cannot allocate physical memory—or reserve sufficient virtual memory (VM)—to fulfill
allocation request. By default, the addressable virtual memory
space that is available for the process is 2 GB. If the virtual address space is exhausted, the operating system cannot allocate
more physical memory for the process. RESOLUTIONOn computers running the following operating systems, you can turn on the special feature 4GT
RAM Tuning:
For more information, visit the following Microsoft Web site: http://msdn2.microsoft.com/en-us/library/aa366521.aspx
(http://msdn2.microsoft.com/en-us/library/aa366521.aspx)
Because of operating system limitations, single-process configurations cannot address more
than 3 GB of virtual memory. To use the available physical memory more
efficiently, use multiple processes. For example, ASP.NET
under Microsoft Internet Information Services (IIS) 5.0 permits Webgarden mode to run one worker process for each CPU on
a multiple-CPU server. For systems running IIS 6.0, you can configure your Web site to run
separate applications in an application pool. However, even with the 4GT RAM Tuning feature turned on, a single process cannot allocate all 3 GB of memory. All system DLLs are loaded in fixed VM addresses. Therefore, the upper VM area becomes fragmented. The memory manager must reserve a segment of VM to make the memory allocation. The process cannot allocate more memory if the memory manager cannot find a contiguous VM address range for the next segment. Typically, the segment size is sufficiently large (32 or 64 MB). This problem is not specific to ASP.NET or the common language runtime. It is an operating system restriction for any type of process. STATUS This
behavior is by design. REFERENCESFor more information about 4GT
RAM Tuning, visit the
following Microsoft Web site: http://msdn2.microsoft.com/en-us/library/aa366521.aspx
(http://msdn2.microsoft.com/en-us/library/aa366521.aspx)
For
additional information, click the following article numbers to view the
articles in the Microsoft Knowledge Base: 171793
(http://support.microsoft.com/kb/171793/EN-US/
)
Information on Application Use of 4GT RAM Tuning
316739
(http://support.microsoft.com/kb/316739/
)
How to Use the /USERVA Switch in the Boot.ini File to Tune /3GB Configurations
| Other Resources Other Support Sites
CommunityGet Help NowArticle Translations
|





















Back to the top