5

I'm getting the following error with iis 7 for any page that takes more than 7-10 minutes to complete :

A worker process 'xxxx' serving application pool 'xxxxxx' failed to stop a listener channel for protocol 'http' in the allotted time.

why iis stopping a listener channel? it how can I increase this allotted time? should I? or is this an indication of another issue?

1 Answer 1

4

IIS pings a worker process periodically (by default, every 30 seconds) to make sure it is still responsive. It is possible that your worker process is too busy to respond to the ping, so IIS tries to terminate it. When IIS tries to terminate the process, it fails, because the process is still hanging on to areas of memory.

Go into IIS, click Application Pools, then right-click on your app pool and choose Advanced Settings. Under the Process Model heading, choose False next to Ping Enabled and see if that fixes the issue. Another option is to increase the Ping Maximum Response Time.

Image of IIS7 Application Pool Advanced Settings

As for whether or not this signals a larger problem, I would say yes, it does. It doesn't seem appropriate for that type of code to execute synchronously. You might want to consider passing the task off to a Windows service that will do an async callback, or investigate IIS's async model (System.Threading). How to do that would probably be a better question for stackoverflow.

3
  • actually, what I did was to try this on another machine, with the same ping setting everything works fine. so it must be something else, but I can't figure out what. could iis be broken? I'd hate to have to reinstall the server.
    – Sumrak
    Jul 7, 2009 at 0:46
  • I'd still try this fix on the production machine. Perhaps the other machine had a lower load. Regardless you might want to think about changing the way this code works as it doesn't seem like it is the best idea even if it doesn't timeout.
    – Adam Brand
    Jul 7, 2009 at 1:26
  • 2
    ah, found the issue. I was triggering RAM limit and having app recycled. thanks for the help.
    – Sumrak
    Jul 7, 2009 at 2:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .