1
votes

I have an Asp.Net MVC 5.1 website on a VPS and until a few days ago everything went perfectly without any problems. It has 4 GB of RAM, quad core CPU (3 GHz) and a SSD for Windows drive (currently 10 GB free space) so I don't think it's a hardware issue. The problem started after I installed the Wordpress using the Web Platform Installer but that might be just a coincidence. When I restart the VPS everything is smooth. After couple of hours the CPU usage of w3wp.exe goes to 100% and never comes down. I stopped all the websites running and waited for a few minutes and it's still at 100% so I'm sure it's not any of the websites. Is there any way for me to troubleshoot where the problem is coming from? Can you guess where I should start?

Update:

I restarted the DefaultApplicationPool in the server which was related to one of the websites running on the server and it immediately dropped the CPU usage of the IIS to 3. I started it again and it's now going on 3% CPU and the website is fully functional. I think it'll go to 100% soon though!

1
Have you seen this guide?Andrei
Does TaskMan say that IIS (w3wp.exe) is still using all that CPU? Make sure you are chasing the right process.tgolisch
@Andrei I haven't seen it but I'm doing the steps mentioned in that article step-by-step. Hopefully it'll help me find the problem.Alireza Noori
@tgolisch Yes, Task Manager is saying that w3wp.exe is using the 100% CPU all the time :(Alireza Noori
Have you tried checking iis logs to see where the requests are going. You should be able to enable time taken in the logs to see if any are running more than normal and/or more requests are coming in than normalDinesh Rajan

1 Answers

1
votes

I followed up the tutorial mentioned by @Andrei and confirmed that it's IIS that's taking the high CPU and it's the main site that's taking the CPU. I confirmed this by creating a new application pool and changing the website's pool to that. After a while the CPU usage went to 100% again and I was sure something was wrong with my website.

Then, after some research I came across this IIS forum thread which gave me some ideas. I used the following command:

%windir%\system32\inetsrv\appcmd list requests

And saw that there are a lot of requests hanged at one action. This action was waiting on a web service which returned a list of SMS messages received by our website and wasn't working at the time. I changed the code and disabled it for now. The IIS is currently using 3% CPU.