Archive

Posts Tagged ‘Unhandled Exceptions’

Unhandled Exceptions that can Crash your IIS Application Pool

February 6th, 2010 No comments

Jeff Dalton: Adventures In SharePoint Land : http://sharepoint.nailhead.net/2010/02/unhandled-exceptions-that-can-crash.html

His team discovered some nastiness with unhandled exceptions inside their custom SharePoint code. Specifically they found that unhandled exceptions inside of SharePoint.Publishing.LoginRunningOperationJob can result an IIS Application Pool crash.

The reason is because this class puts the delegate code onto a separate thread that when aborted can leave the Application Pool in an unstable state. Which can (and does) result in an Application Pool recycle (which is bad for very large SharePoint sites that take a few minutes to spin-up).

So you need to make sure that your delegate code is wrapped in try/catch and do NOT throw the error from inside your catch (same as unhandled exception).