aspnet_wp process recycles itself

Discussion in 'ASP .Net Web Services' started by Avi, Nov 16, 2004.

  1. Avi

    Avi Guest

    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.
     
    Avi, Nov 16, 2004
    #1
    1. Advertising

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





    "Avi" <> wrote in message
    news:...
    > 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], Nov 16, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mikael Gustavsson
    Replies:
    2
    Views:
    478
    Mikael Gustavsson
    Aug 14, 2003
  2. matt
    Replies:
    1
    Views:
    9,692
    =?Utf-8?B?cm9iX2Jvc3Rvbg==?=
    Apr 6, 2004
  3. =?Utf-8?B?U2ltb24gTWNDdWxsb2No?=

    User cancels manual file download and aspnet_wp.exe recycles

    =?Utf-8?B?U2ltb24gTWNDdWxsb2No?=, Apr 30, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    1,016
    =?Utf-8?B?U2ltb24gTWNDdWxsb2No?=
    Apr 30, 2004
  4. Robert W. Eckert
    Replies:
    4
    Views:
    777
    =?Utf-8?B?Um9iIEVja2VydA==?=
    Oct 5, 2004
  5. srivalli c via DotNetMonster.com

    does Session_End event fire when the worker process recycles?

    srivalli c via DotNetMonster.com, Jun 22, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    556
Loading...

Share This Page