Outofmemoryexception in ASP. NET

Source: Internet
Author: User

I saw an article "How to Handle outofmemoryexception?", So I 'd like to share with you the problem of outofmemoryexception in ASP. NET.

In fact, on the ASP. NET web server, the memory that ASP. NET can use is generally not equivalent to the total amount of memory. In the machine. in the config configuration file, the configuration section <processmodel> contains the "memorylimit" attribute. The value of this attribute is a hundred points. The default value is "60", indicating that ASP is specified. net process (in the task manager, you can see ASP.. Net Process, aspnet_wp in iis5, w3wp in IIS6) can use 60% of all physical memory. When ASP. when the memory used by net exceeds this limit, IIS starts to automatically recycle (recycle) processes, that is, creating a new process to handle HTTP requests, the memory occupied by the old process is recycled.

When we have a server with a large memory, the value of "memorylimit" needs to be adjusted appropriately. For example, if we have a 4G memory server, 4G x 60% = 2.4g. However, for Win32 operating systems, a process occupies only 2 GB of memory space. When the memory occupied by the ASP. NET process starts to reach 2 GB, IIS does not start the recycle process because it does not reach the "reclaim threshold" of 2 GB. However, due to Win32 restrictions

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.