aspnet_wp process recycles itself

A

Avi

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.
 
D

Dino Chiesa [Microsoft]

see here
http://www.experts-exchange.com/Pro...Languages/Dot_Net/ASP_DOT_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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top