Posts Tagged ‘application pool’

HOWTO Restart SharePoint Web Services without having to use IISReset

April 11, 2012

We’ve all been there before – a SharePoint component has broken, you have ULS log events flooding in, stuff is broken, and you have to use IISReset to fix the whole thing. It’s a sledgehammer solution for opening your SharePoint walnut.

We had an ongoing issue with the Search and Metadata web services. Search results for people search was failing with an error, and we were receiving ULS errors such as:

SharePoint Web Services Round Robin Service Load Balancer Event: EndpointFailure Process Name: OWSTIMER Process ID: 12264 AppDomain Name: DefaultDomain AppDomain ID: 1 Service Application Uri: urn:schemas-microsoft-com:sharepoint:service:id#authority=urn:uuid:anotherid&authority=https://myappsserver:1234/Topology/topology.svc Active Endpoints: 1 Failed Endpoints:1 Affected Endpoint: http://myappsserver:1234/1234567890/MetadataWebService.svc

and:

SharePoint Web Services Round Robin Service Load Balancer Event: EndpointFailure Process Name: w3wp Process ID: 8240 AppDomain Name: /LM/W3SVC/id/ROOT-1-anotheridAppDomain ID: 2 Service Application Uri: urn:schemas-microsoft-com:sharepoint:service:anotherid#authority=urn:uuid:eb9a958eaedf480bad3c2beaff70549b&authority=https://myappsserver:1234/Topology/topology.svc Active Endpoints: 1 Failed Endpoints:1 Affected Endpoint: http://myappsserver:1234/5678901234/SearchService.svc

The normal fix for this is an IISReset, however a less brutal method can be just to recycle the application pool for the web service instead. You can do this via IIS Manager as follows:

  1. Identity the service that is failing via ULS entries (as above) and in particular note the Id of the web service. This will be located in the URL, so in the above example the web service id for the SearchService.svc is 5678901234
  2. Open the IIS manager and expand the node Sites, SharePoint Web Services. This will display all web services available on that SharePoint server
  3. Locate the service using the id (they will be named the same). You can validate it is the correct service by switching from “Features View” to “Content View” at the bottom of the IIS manager once you have selected the service. Content view will show you (for example) two files, SearchService.svc and web.config
  4. In the “Actions” pane on the right hand-side select “Advanced Settings…” and note the Application Pool id
  5. In IIS Manager, select the “Application Pools” node and select the node with the matching Application Pool id.
  6. In the Actions Pane on the right hand-side, click Stop
  7. Wait about 5 seconds, then click Start

This will force the application pool to unload and effectively restart the web service.  You can then check your ULS logs and test whether the service is working in SharePoint.

NOTE: be aware that you will generally get a flood of ULS entries while stopping and starting the service, as SharePoint tries to access the web service but cannot.