Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

aspnet_wp.exe still running after web application closed

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
We're encountering what could be a problem with our web application - developed using Visual Studio.NET (ASP.NET web pages with C# code).
After closing the web application down what we're noticing is that (via 'Task Manager') the 'aspnet_wp.exe' process is still running (and using up quite a bit of memory) albeit that it's not actually active.
Will this be a problem to us ?

It seems to give us a minor one at the moment in the sense that it's locking a text file we're writing to when the application raises errors.
So when we run the application for a second time it tells us that the file is locked.
It's only after we close the 'aspnet_wp.exe' process in 'Task Manager' that it frees this up again.

Should the 'aspnet_wp.exe' process still be running after closing the web application down or are we missing something fundamental here ?

Any thoughts ?
Thanks in advance,
Steve
 
The aspnet_wp.exe should always be running regardless of whether you have the app open. It is there to handle requests.

If you navigate to a page you have created (without your web app open) it will still run - this is because the worker account handled the browser request. It is there to serve pages and that is what it is doing.

As for the text file, the most probable reason that it is locked is that you have not released it in code. Check the page that opens it and make sure that you close it and destroy all objects that used it.



----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Thank you for your reply.
I've since resolved the issue with the locked text file. :)
And I understand (and see) that the 'aspnet_wp.exe' is always running.
However what is of concern to me is that before I start the running of my web app this process (aspnet_wp) is only using a small amount of memory, but during and after closing the web app the usage then shows to be considerably more.
Is there any sensible reasoning for this ?
My worry is that we're not closing something properly ?
Thanks again.
Steve
 
My worry is that we're not closing something properly ?

Unless the worker process is using an extremely high amount of memeory, you proabably won't be affected.

If I kill my process, it restarts and uses 3k. Simply openeing a project (not running it, just opening it in VS) bumps this up to 18k. Even when I close the project it remains at 18k. This is just because it retains information in memory (just like any other program) and eventually will get rid of it when it is not needed.

If you notice that the amount being used is extremely high I would start to look into some parts of you web sites. It may be that you return a big dataset from a database (this can use up memory very quick). I would suggest looking at the amount of memory being used, run certain parts of your site, and then look at the memory increase. This may help you locate any memory leaks.

Hope this helps.

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Prior to running the web application (while having Visual Studio open) the 'aspnet_wp.exe' is using about 3,000K on memory usage (as seen via Task Manager).
When I run and close the application (hitting the database admittedly but not retrieving heavy result sets in this test instance) it then sits at a usage of about 30,000K.
Does that sound feasible ?
If I then restart the process (by ending it and it restarting itself) it returns to a usage of about 3,000K.
Thanks for the feedback,
Steve
 
I don't think you will have any problems running at 30k (unless you don't have much memory on your machine). We have 4GB of RAM on our server and we once had a memory leak that meant the process was running at about 1GB! This slowed things down a bit but it now runs comfortably at about 170k.

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top