Wednesday, August 22, 2012

ThreadAbortedException on People Search

A small, but irritating issue I've found with people search in SharePoint 2010 is the ThreadAbortedException. This exception will be thrown at irregular intervals, usually occurring after an iisreset or if the user is idle or has not accessed the site after a recycle. After the exception is thrown, consecutive searches will not have any issues.

In our environment, the issue was caused by our multi web front end farm with a 'Search Query and Site Settings Service' running on each server. The service is used to handle result set building on multiple servers. I can only assume that at some point during the query process, the exception is caused by simultaneous service access. I was able to prevent the exception from being thrown by stopping the service on all our web front end servers, but leaving one instance running on our central administration server. This is not an ideal solution as it will leave only one server building search result sets from the search index, but we don't have a large organisation so it's sufficient for us. Our central admin server is not used to serve web traffic, so logically it makes sense for it to run search crawls and the querying service.

You can stop the 'Search Query and Site Settings Service' in Central Administration in the 'System Settings' configuration category and 'Manage services on server' page. Be aware that this page only shows services running on the selected server.

No comments:

Post a Comment