maximum thread execution time [Answered]RSS

1 reply

Last post Apr 28, 2014 04:40 AM by Vogues

  • maximum thread execution time

    Apr 25, 2014 06:16 PM|todd.c|LINK

    Hello

    I was wondering if it was possible on IIS6 to set the maximum execution time of a thread.

    Let's say the thread is running for long enough that the initial request has timed out.

    Can I configure IIS such that if a thread runs for >X minutes, to kill it and return it to the pool so I can minimize the diminishing resources on the system?

    I'm working on a new system with alot of .net code (many wcf services). Despite trying to do extensive testing, there are alot of new components, and I'd like to be able to constrain the impact of any given error on the rest of the system so that if some kind of loop or hang occurs it doesn't poison the thread pool by hanging onto resources, since the response cannot be made anyway.

    I'd rather kill the thread rather than the whole app pool because building up the cache is a moreless expensive process that I'd have to do again if the pool was recycled.

    Thanks for any input.

    -TC

  • Re: maximum thread execution time

    Apr 28, 2014 04:40 AM|Vogues|LINK

    Hi todd.c,

    When it is necessary to conserve system resources by terminating unused worker processes, you can configure a worker process to gracefully close after a specified period of time. You can use this feature to better manage the resources when the processing load is heavy, when identified applications consistently fall into an idle state, or when new processing space is not available. You can also start additional worker processes to replace a worker process that is finished.

    So, please try to set the Idle time out, more information please refer to:
    http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/83b35271-c93c-49f4-b923-7fdca6fae1cf.mspx?mfr=true