Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / November 2004

Tip: Looking for answers? Try searching our database.

aspnet_wp process recycles itself

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Avi - 16 Nov 2004 12:26 GMT
Hi,
    We have a webservice in c# which makes use of XML and COM objects. The
MemoryLimit in processModel in machine.config is set to the default of 60. A
new process "a.exe" is started from within the webservice using
System.Diagonostics.Process.Start(). The aspnet_wp process recycles itself
once it reaches a maximum of 60% of the total virtual memory.
The problem is two-fold.

1. How can we get a handle to the recycle event so that the "a.exe" process
can be killed and its memory released during recycle? We tried
Application_End and Session_End events but they were not fired during the
recycle.

2. How can we ensure that the memory does not reach the upper limit through
forced garbage collection?

    Increasing the MemoryLimit does not seem to be a plausible solution.

Thanks for your help.
Regards.
Dino Chiesa [Microsoft] - 16 Nov 2004 21:41 GMT
see here
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DO
T_NET/Q_21066016.html


it asks the same question, and a response from daffodils.

In short, recycle of aspnet_wp.exe does not result in triggering of
Application_End(). by design.

> 1. How can we get a handle to the recycle event so that the "a.exe"
> process
> can be killed and its memory released during recycle? We tried
> Application_End and Session_End events but they were not fired during the
> recycle.

I don't know this.

> 2. How can we ensure that the memory does not reach the upper limit
> through
> forced garbage collection?

Manually performing GC is not going to solve your problems.  trust me, the
.NET runtime will be in a better position to decide when and how often to GC
than your app.  You shouldn't be tweaking with this, unless absolutely
positively required, and even then, you had better make sure you know what
you are doing.

The symptom you describe (Aspnet_wp.exe recycle) is caused by  memory
growth, or a non-responsive or runaway process.  IF this is what you have,
then it sounds like an application bug.  Find and fix the bug to remove the
anomalous behavior.

Also, I think you need to re-visit your app design, to figure out when and
how to attach to a.exe .    Why are you doing a Process.Start()?  This seems
hacky.

-Dino

> Hi,
> We have a webservice in c# which makes use of XML and COM objects. The
[quoted text clipped - 19 lines]
> Thanks for your help.
> Regards.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.