views:

67

answers:

1

I have a web service that creates a thread to process some data in the background. I've seen a "System.Threading.ThreadAbortException: Thread was being aborted" message in one of my logs where the thread was killed. I am currently under the assumption that the thread will run as long as it takes to execute the tasks that it's working on, however after googling the exeception I've seen several posts making mention of increasing the ExecutionTimeOut property of the application in the web.config file. My question is:

What is the maximum execution time of a thread executed in ASP.NET? Is this timeout unlimited or still bound by the ExecutionTimeOut property of the application?

+2  A: 

This is a similar question.

http://stackoverflow.com/questions/2675910/how-to-know-who-kills-my-threads

You can run it as long as the pool is running. If the pool thats keep the thread is restart then its wait for all the threads to exits, but the web service to run the pages stop working at this moment, and you have problems. Also if you have setup your pool then in pool recycle if the thread is not stop after some time its kill it.

In My program one index thread it was running for more than 26 hours doing hard database work, and was on static function.

Aristos