473,788 Members | 2,924 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Prevent worker process from recycling when foreground thread is executing.

Dear all,

Is there any way to prevent the ASP.NET worker process from recycling
the worker process when a thread is being executed on the foreground
(IsBackground=f alse).

I'd also like to know if there a way for a foreground thread to detect
if the worker process is being recycled?

It seems that when a worker process recycles (under IIS 5.0) a thread
simply gets killed and there is no way for the thread to find that
out.

Thanks for your help everyone.

Kind regards,

Marcel van den Hof
Nov 19 '05 #1
3 2543
I don't have an answer for you other than saying that this is a reason I
prefer not to fire off background threads in ASP.NET.
If I have background tasks to do (that take a significant amount of time) I
prefer to implement them inside a more reliable Windows Service.

Here's more info on Windows Services:
http://msdn.microsoft.com/library/de...plications.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
"Marcel van den Hof" <ma*******@gmai l.com> wrote in message
news:5f******** *************** *********@4ax.c om...
Dear all,

Is there any way to prevent the ASP.NET worker process from recycling
the worker process when a thread is being executed on the foreground
(IsBackground=f alse).

I'd also like to know if there a way for a foreground thread to detect
if the worker process is being recycled?

It seems that when a worker process recycles (under IIS 5.0) a thread
simply gets killed and there is no way for the thread to find that
out.

Thanks for your help everyone.

Kind regards,

Marcel van den Hof

Nov 19 '05 #2
I appreciate your response Steven.

I completely understand that using a Windows Service would not cause
threads to be terminated unexpectedly.

However I am still interested in understanding the precise behaviour
of how the worker process recycles a thread with the IsBackground
property set to true. (and how to prevent this or pick this up in the
thread)

Thanks for your input.

Kind regards,

Marcel van den Hof
Nov 19 '05 #3
when a recyle happens, the asp.net worker process actually exits, thus
killing all threads and releasing all memory (managed or unmanged). the
point of a recycle is to recover from runaway thread or memory leaks.

-- bruce (sqlwork.com)

"Marcel van den Hof" <ma*******@gmai l.com> wrote in message
news:un******** *************** *********@4ax.c om...
I appreciate your response Steven.

I completely understand that using a Windows Service would not cause
threads to be terminated unexpectedly.

However I am still interested in understanding the precise behaviour
of how the worker process recycles a thread with the IsBackground
property set to true. (and how to prevent this or pick this up in the
thread)

Thanks for your input.

Kind regards,

Marcel van den Hof

Nov 19 '05 #4

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

Similar topics

5
2599
by: Bill Davidson | last post by:
Hello All: I've got a question about synchronization requiremements in a C# worker thread procedure that, among other things, sinks events from outside sources. I realize the worker thread will be interrupted to handle an incoming event (and the flow of execution subsequently diverted to the respective event handler). My question is at what point or points could this interruption occur. Will it only occur when the worker thread is...
3
2837
by: Trevor Andrew | last post by:
Hi There, I have a small ASP.NET application under development. I am using VS.NET 2002 (2003 upgrade is on the way) with .NET Framework 1.1. It is hosted on a web hosting service in the US. I am experiencing the "Viewstate corrupted" error message on a particular page, when that page is left for a period of time and I return to it again, and submit it again. The page in question has a drop-down list of various RSS news feeds I am...
0
2339
by: Trevor Andrew | last post by:
Hi There, I have posted something previously regarding this issue, but I think I have some more concise questions to ask, and would like to get further feedback on this issue. Firstly the background. I have a small ASP.NET application under development. I'm using VS 2002 with Framework 1.1. One of the pages is a "resources" page that contains a list-box of various RSS feeds I am interested in surveying. As you select the different RSS...
5
2617
by: Adam | last post by:
I have been having a problem where two aspnet_wp are starting when I view a web page I made. This has just started happening. If anyone has had a problem like this I would like to know why this might be happening.
6
2127
by: mark | last post by:
Just wondering if anyone has aspnet process recycling set up in any production environments. Our worker process memory gets out of control after being up for about a day or so and we were thinking about setting up some thresholds on memory usage. Any experiences using this would be greatly appreciated. thanks
2
2325
by: Jeremy S. | last post by:
Just wondering if/how a sliding Cache expiration interacts with Application Pool Worker Process Recycling. Specifically, if I were to place some value into the Cache object with a sliding window of 2 hours, but property setting for the relevant App Pool is 1 hour (and there is no activity following the placement of the data into the Cache), then WILL the data automatically be removed from the Cache when the App Pool recycles? Or, is it...
7
2131
by: Jeff Stewart | last post by:
I need a thread to run a subroutine which updates my main form's progress bar. I've properly marshaled all UI updates to the main UI thread, and after the main thread starts the worker thread, it waits for the worker thread to complete by means of a while t.isAlive, sleep(0) mechanism. But when my worker thread calls my UpdateProgressBar routine, which calls Me.Invoke, the invoke call blocks forever. But I can't figure out why the main...
1
4901
by: Pablo Bianco SE | last post by:
Hi everyone, I am new in this group. I have a question and would like to have some support. A customer is experiencing memory problems with the asp.net worker process. The have an application installed on Windows 2003 Server (IIS6). We the application starts the worker process ocuppies about 70MB, but it keeps growing gradually during users activity. In just few hours (about 4 hours) it can reach 800 MB, making the application not being...
13
7358
by: Edwin Smith | last post by:
I have a form which displays a DataGridView table generated with the VS2005 tools. The database is a Pervasive v.9 with an ODBC driver. The DataGridView works great except when I'm done and I click the X to close the form the .exe refuses to die and has to be killed in Task manager. I ran a debug trace and it seems to work fine. I dropped a CLOSE button onto the form and put "this.Close();" in for it's event but I get the same result.
0
9656
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9498
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10172
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9967
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4069
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.