Freigeben über


High CPU Utilization by Security Token Service on SharePoint Server 2013

Issue

You have a high CPU utilization, in my case it was almost 100% for several hours, and mostly consumed by the Security Token Service (STS). The issue will show up after installing June 2016 CU for SharePoint 2013, or any subsequent CU until March 2017 CU.

Restarting IIS will resolve the issue temporarily, but it will show up again shortly. Checking the SharePoint ULS logs will show events as shown below:

 

 xx/xx/xxxx xx:xx:xx.xx w3wp.exe (0x34F0) 0x47C4 SharePoint Foundation Database 4ohp High Enumerating all sites in SPWebApplication Name=Contoso Site. 

xx/xx/xxxx xx:xx:xx.xx w3wp.exe (0x0448) 0x066C SharePoint Foundation Database 4ohq Medium Site Enumeration Stack:    at Microsoft.SharePoint.SPBaseCollection.GetEnumerator()     at Microsoft.Office.Server.Search.Administration.UrlMapper.GetNewCacheEntry(Pair`2 properties)     at Microsoft.Office.Server.Search.Administration.UrlMapper.GetUrlMapping(QueryProperties properties, Boolean useCache, UrlZoneOverride urlZoneOverride)     at Microsoft.Office.Server.Search.Administration.SearchServiceApplicationProxy.<>c__DisplayClass6.<UpdateQueryProperties>b__4(Object x)     at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)     at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()     at System.Threading.ThreadPoolWorkQueue.Dispatch()

 

Cause

Analyzing this issue shows that the Security Token Service was heavily consumed by receiving so many requests while SharePoint was enumerating all the sites in the farm, and in my case we had so many sites.

 

Solution

The issue was fixed in March 2017 CU for SharePoint Server 2013.

 

Note: this fix is only for this issue, and is not supposed to resolve any other performance or high CPU issue you have in your SharePoint farm.

Comments

  • Anonymous
    September 14, 2017
    I have applied November 2016 CU in December but i am seeing this issue now. Any how i can resolve this issue? Recycling app pool or rebooting server not resolving.
    • Anonymous
      September 16, 2017
      Hi Suresh,Installing March 2017 CU for SharePoint Server 2013 should resolve this issue. Hence, install it on all your SharePoint servers, restart them and then run the SharePoint Products configuration wizard on all your SharePoint servers starting with the Central Administration server. If the issue is still there after doing so, then you are hitting another issue.
  • Anonymous
    October 26, 2017
    Why sharepoint is enumerating all sites in farm?
    • Anonymous
      December 05, 2017
      Well, this is a question to be asked to the product group in MS :)