W3wp.exe memory usage

Source: Internet
Author: User

First understand some information about this process

Process file: w3wp or w3wp.exe
Process name: ISS application pool Process
 
Description:
W3wp.exe is part of the ISS tool.

Prepared by: Microsoft
Microsoft Web Server

System Process: No
BackgroundProgram: No
Network used: No
Hardware related: No
Common error: Unknown N/
Memory usage: Unknown N/
Security grade (0-5): 0
Spyware: No
Adware: No
Virus: No
Trojan: No

In IIS6, w3wp memory usage often fails to be released in time, resulting in slow server response.
After studying it today, you can make the following configurations:
1. configure a separate application pool for each website in IIS. That is, they do not affect each other.
2. Set the recycle time of the application pool. The default value is 1720 hours, which can be modified as needed. At the same time, set the number of w3wp processes that run simultaneously to 1. Then, when the memory or CPU usage exceeds the limit, the memory will be automatically reclaimed.

In general, this can be solved. However, some websites cannot be correctly released due to program problems.
So how can we find the website?
 
1. Add the PID field to the task manager. You can see the process PID with the highest memory usage or CPU usage.
2. Run iisapp-A at the command prompt. Note: the first running will prompt that no JS support is available. Click OK. Then run it again. In this way, we can see the application pool corresponding to the PID.
3. Check the website corresponding to the application pool in IIS.

Q:

Memory: memory usage is very large. It reaches 1 GB. Why? Is there any way to avoid this situation?

A: This is mainly because your asp. Net Program has memory leakage. For unmanaged resources, be sure to release them.

Q: My situation is as follows:
2 Xeon 2.8 GB memory 512 m scsi hard disks (soft images) configured on the server)
Windows 2003
Now I am stuck with an Asp.net website with a low access volume, but one problem is that
Every time the server runs for 2-3 days, it is very slow to visit the website. After restarting the server, it will be normal.
View the memory usage of the process and find that the w3wp.exe and sqlservr.exe processes occupy the memory.
The size of physical available memory reaches more than 170 MB (each), and almost no memory is used up.
(The memory occupied during server restart is very small, only 40 MB per)
In the past, when a website was mounted to a virtual machine, databases were separated. This never happened.
Later, the original version was transplanted to the new server ~~
Another problem is that I found many SQL processes in the SQL Enterprise Manager. The process caused by. NET is sleeping, but the memory is occupied ~ Cannot be released

I haven't solved this problem for a long time.
For help ~~ Please kindly advise ~~ Thank you very much ~~~~~

Answer: IIS service manager ---- application pool ---- add your application and set the maximum memory. When the Program reaches the maximum memory, it will automatically restart.

My problem is the same as yours, but my memory is 2 GB and the access traffic is high. Generally, I have to restart after 24 hours of operation, and the memory is not enough, w3wp processes account for one hundred and eight 90 MB, and SQL accounts for more than two hundred MB, You have to restart, or the whole site will be there .... 55555555. It's almost half a month. It's still not good. It's painful.

W3wp.exe is your ASP. NET application host. If you use a large number of session, cache, and other resources, and the session supermarket takes a long time, the memory usage is relatively large. The application pool is a feature designed to increase performance, but it also consumes a lot of memory. In addition, turning off most services in Windows Server 2003 (which can be switched off without any need) can also save some memory

1. Suspect the cache applied in the program,
2. the cache contains a large amount of data.
3. Frequent cache refresh
4. No cache method is designed.

I have met your problem before. I used to use sessions. After I changed them all to cook, it would be much better, it should be because of a problem with your session or your cache (the cache doesn't know much about it, but it should be somewhat true)

Trace the SQL call records and record the time each time a large amount of data is written to the cache or session to check whether the time is too frequent.

1.The process of asp.netin win2003is w3wp.exe

2.512 M memory is enough for personal use, but it is not enough to put it on the server, especially win2003 + Asp.net + SQL Server. In particular, SQL Server is very memory-consuming. If it is not controlled, it will occupy all the physical memory (only a few MB is left for 100 MB ). Win2003 occupies around MB. There is nothing left.

3. to optimize the Asp.net program, I would like to say that there is little or no need to use session cache applications and other things, and whether there is a page flip, the page flip processing will also occupy a lot of memory.

4. Restrict SQL Memory. Enterprise Manager -- SQL attributes (generally local) -- "Memory" tag
Here, let's look at the memory settings and change the maximum value to MB.

Article 4 is the fastest way. You can try it.

This problem also exists in one of my self-developed OA systems.
To sum up, this is probably because of the improper use of sessions and cache.
Many sessions and caches are used in my application,
I found the "dynamic memory allocation" article in msdn. Today, I will explain whether it works.
I hope some experienced friends can give me more information. You can also summarize the reasons for similar errors. Thank you !!

I don't know what website you are. It is said that it will not occupy such a large amount. As shown above, you have used the cache to store excess content. Of course. Session-like objects are unlikely to occupy such a large amount of data, or some objects with a long time or permanent persistence similar to the application are used to save a large amount of data. For example, using a single instance to save data may result in a large amount of memory.

Jianye 2003 system installation requires at least 1 GB of memory.

W3wp.exe is an IIS process in 2003. As for the memory usage of SQL statements, it may be because your SQL statements do not set a memory usage limit.

 

 

 

I have been busy with the company's projects for a while and have no time to update the technology blog. Some supplements will be made in the last few days.
The company's servers often crash in the last month, because the Website access volume developed by our project team far exceeds that of other websites on the server, therefore, the server administrator considers the system crash caused by our website program. But what is the truth? See the following description:

 

Server Management Personnel (management): You see that the server load is 99% of your website, and the server crashes. The CPU usage of a w3wp.exe process is 99%. Other customers' websites are caused by small programs. They must be caused by you.
Me: Our website is not easy to use. Is it really a problem ...... Let me go back. (I am secretly thinking that the website with a maximum daily access volume of 40 thousand won't let my program do this)

 

after I go back, I constantly modify the hidden flaws in the program and try to prevent the server from updating the program during peak hours. However, the server still crashes frequently and the frequency increases gradually, it is usually three times a day. Depressed ...... Why?
today, the Server Manager shouted at me again and said, "Let's take a look. The server crashes again. What do you do? I am depressed. I said, why are you so sure it is caused by the process of our program? "...... After a while, I said, "You shut down our site and process pool, and restart the server "...... After a few minutes, the server started, and our website was shut down, the server still had a w3wp.exe high CPU consumption. I said this was definitely not our problem. They also knew they had made a mistake, but did not apologize. I went back to the office to test and found that the data maintenance program on the website was used illegally. Because the CPU was occupied by w3wp.exe not on our website, what should I do? In this case, I started my research and worked with the Server Manager to find the true destination of w3wp.exe. However, only the PDI number in the task manager cannot directly view the server process pool. What should I do? Google.
Microsoft's document: iisapp. vbs: the IIS application query script runs iisapp on the server. the vbs script detects the ownership of the corresponding w3wp process pool based on the PID and finds that it is caused by a program on a customer's website, however, since the early management personnel did not properly allocate a process pool to the customer's website, more than websites are in the default process pool. How can we continue to check the pool, assign process pools to existing customer websites according to certain rules, and then use iisapp. vbs found that it was caused by a Jinan customer's website program. It stopped and said, OK, everything is normal. We found that the CPU usage of our w3wp.exe process was always between 0 and 1%, and the memory consumption was less than 130 MB. When we wait for the second phase of the project, we will try our best to trim the program to improve performance and minimize the burden on the server, so as not to die when there is too much traffic.

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.