Professional Web Applications Themes

aspnet_wp process recycles itself - ASP.NET Web Services

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

  1. #1

    Default aspnet_wp process recycles itself

    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 Guest

  2. #2

    Default Re: aspnet_wp process recycles itself

    see here
    [url]http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET/Q_21066016.html[/url]

    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" <Avidiscussions.microsoft.com> wrote in message
    news:3DD77BB4-1238-42F6-8099-890275E216CAmicrosoft.com...
    > 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] Guest

Similar Threads

  1. Must manually attach to ASPNET_WP process to debug ASP.NET code
    By Chris Conrad in forum ASP.NET Web Services
    Replies: 0
    Last Post: March 16th, 01:47 AM
  2. The process aspnet_wp is a surviver !
    By news.iq.ca in forum ASP.NET Security
    Replies: 1
    Last Post: December 31st, 12:38 AM
  3. worker process aspnet_wp.exe identity
    By Calvin in forum ASP.NET Security
    Replies: 1
    Last Post: August 20th, 03:27 PM
  4. Replies: 1
    Last Post: August 5th, 02:57 PM
  5. Replies: 0
    Last Post: June 27th, 05:32 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139