Professional Web Applications Themes

Way to automatically recycle aspnet_wp work process when close to 100% CPU for certain period of time? - ASP.NET General

I have a server setup that is dedicate to providing a "proxy" by exposing a web service that calls methods in a 3rd party ActiveX control and then returns the results. Sometimes, the aspnet_wp work process seems to get "hung" - it goes to close to 100% CPU and stays that way. Under these cirstance, it appears that it is really the ActiveX control causing the problem. Running IISRESET from the command line resolves the issue, for a while, at least. 1) Is there a way to configure ASP.NET so that if the worker process is detected at very high ...

  1. #1

    Default Way to automatically recycle aspnet_wp work process when close to 100% CPU for certain period of time?

    I have a server setup that is dedicate to providing a "proxy" by exposing a
    web service that calls methods in a 3rd party ActiveX control and then
    returns the results. Sometimes, the aspnet_wp work process seems to get
    "hung" - it goes to close to 100% CPU and stays that way. Under these
    cirstance, it appears that it is really the ActiveX control causing the
    problem. Running IISRESET from the command line resolves the issue, for a
    while, at least.

    1) Is there a way to configure ASP.NET so that if the worker process is
    detected at very high CPU (>80%) for longer than a certain period of time,
    it will automatically recycle it?
    2) I think it might be a threading issue. Is there an attribute I can set in
    a Web Service, or in a configuration file, so that it will work better with
    Active X controls?


    Luther Guest

  2. #2

    Default Re: Way to automatically recycle aspnet_wp work process when close to 100% CPU for certain period of time?

    My $0.02 is below...

    "Luther Miller" <invalid> wrote
    -snip-
     

    Not a built-in way (at least that I've ever heard of), but you could
    consider writing a windows service that kills it periodically. Probably not
    the ideal approach.
     
    in 
    with 

    If the problem is the ActiveX control itself, I'd advise just find another
    component that does the job for you and stop using the one causing the
    problem. I'm sure you thought of that, so if instead the problem IS being
    cause by calling the control on multiple threads and possibly causing
    concurrency errors, then simply wrap your calls to that component in a
    function that uses a Mutex to prevent multiple threads from trying to use it
    simultaneously. Mutex is, of course, explained in the MSDN help.

    -jv


    John Guest

  3. #3

    Default Re: Way to automatically recycle aspnet_wp work process when close to 100% CPU for certain period of time?

    Unfortunately I am stuck with the ActiveX control - it is for access to a
    3rd party data provider, and there are no other options in this case.
    Interestingly, I believe that the problem may be an STA vs. MTA issue.

    I am suspicious that the control is designed for STA use. Web Services will
    call COM components using MTA by default. There does not appear to be an
    easy way to change this behavior (see
    http://support.microsoft.com/default.aspx?scid=kb;en-us;303375).

    However, it looks like I will have to find one...


    "John Viele" <johnv{NO_SPAM}goisc.com> wrote in message
    news:phx.gbl... [/ref]
    time, 
    >
    > Not a built-in way (at least that I've ever heard of), but you could
    > consider writing a windows service that kills it periodically. Probably[/ref]
    not [/ref]
    set 
    > with 
    >
    > If the problem is the ActiveX control itself, I'd advise just find another
    > component that does the job for you and stop using the one causing the
    > problem. I'm sure you thought of that, so if instead the problem IS being
    > cause by calling the control on multiple threads and possibly causing
    > concurrency errors, then simply wrap your calls to that component in a
    > function that uses a Mutex to prevent multiple threads from trying to use[/ref]
    it 


    Luther Guest

Similar Threads

  1. #36853 [Com]: Worker process crashes after application pool recycle
    By kamikazie at comcast dot net in forum PHP Bugs
    Replies: 0
    Last Post: October 18th, 01:32 AM
  2. aspnet_wp process recycles itself
    By Avi in forum ASP.NET Web Services
    Replies: 1
    Last Post: November 16th, 09:41 PM
  3. Could aspnet_wp.exe recycle be due to hackers?
    By ringo in forum ASP.NET Security
    Replies: 4
    Last Post: January 16th, 05:26 PM
  4. Replies: 2
    Last Post: August 27th, 03:50 PM
  5. Replies: 1
    Last Post: August 5th, 02:57 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