473,387 Members | 1,545 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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
circumstance, 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?
Nov 17 '05 #1
2 2002
My $0.02 is below...

"Luther Miller" <lu****@nowhere.invalid> wrote
-snip-
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?
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.
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?


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
Nov 17 '05 #2
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...;en-us;303375).

However, it looks like I will have to find one...
"John Viele" <johnv@{NO_SPAM}goisc.com> wrote in message
news:ul**************@tk2msftngp13.phx.gbl...
My $0.02 is below...

"Luther Miller" <lu****@nowhere.invalid> wrote
-snip-
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?
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.
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?


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

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: | last post by:
This question references to KB articles: http://support.microsoft.com/default.aspx?scid=kb;EN-US;315158 http://support.microsoft.com/default.aspx?scid=kb;EN-US;317012 I'm running Advanced Server...
1
by: Mark Kamoski | last post by:
Hi-- All of sudden (?) the VS.NET v1 IDE is NOT automatically attaching aspnet_wp.exe as a debugged process. Why? Here is the situation. VS.NET (v1)
5
by: Ken Barrett | last post by:
I apologize in advance for cross-posting, but I have noted that others have experienced similar issues and was hoping that someone could help. Briefly, I am working on an ASP.NET content...
4
by: ringo | last post by:
Hi all, I have a couple of Win2000 servers running IIS and an asp.NET web application, and have seen sporadic errors in the event logs: aspnet_wp.exe (PID:PIDNumber) was recycled because...
2
by: Akoni | last post by:
Hello, I have written a ASP.NET (C#) front-end that connects to an unmanaged win32 c++ dll. A few problems occur: -I am unable to use the IO stream (write to an event log) from the dll....
6
by: fernandez.dan | last post by:
I have a umangaged dll ( I have the source code) which I use in my web app using pinvoke. The dll creates a file, writes to it, and then closes it. It works the first time through but the second...
2
by: Sidharth | last post by:
Hello, We are experiencing some issues with the aspnet_wp process on our live servers. The problems are intermittent and we cannot reproduce it on our dev and test servers. Currently around...
0
by: alex | last post by:
Hi currently i'm working on a project with asp.net. Upon going live, I realised that the process thread aspnet_wp.exe increased with every page hits and with every login session, the thread...
111
by: Nate | last post by:
Hello, I am looking for a method to automatically declare variables in C. I'm not sure if there is a good way to do this, but I had something like this in mind... int i; for(i = 1; i < 4;...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.