+1  A: 

Hi Chris

Have you checked that the "Ping Maximum Response Time" mentioned in the error message hasn't bee set to a very low value for your SharePoint application pool?

IIS Manager => Application Pools => (Select apppool) => Advanced Settings

The default is 90 seconds, but for real debugging you probably want to increase that

Per Jakobsen
+1  A: 

Chris,

I don't know where you're breaking into debug in your code, but my guess is that it's in a section that somehow disrupts communication with the worker process. If standard checks are in-place (default behavior) for worker process health, IIS is determining that your worker process has gone non-responsive and is recycling it.

I don't have suggestions on the code side, but have you attempted to disable application pool health checks while debugging? This would entail the following for the worker process servicing your site:

  1. Uncheck any boxes that are checked on the "Recycling" tab of the associated application pool's configuration settings.
  2. Uncheck both of the "Health" tab settings associated with pinging and rapid fail protection.

Doing this should stop IIS from assuming that your worker process is "hung" when, in actuality, it's paused and waiting for your intervention.

I hope this helps!

Sean McDonough