Share via


SharePoint 2016 Troubleshooting: Application pools recycle when memory limits are exceeded

Problem

Saw this problem appear in the farm's health report one day:

Title Application pools recycle when memory limits are exceeded
Severity 2 - Warning
Category Performance
Explanation
The application pools named are configured to recycle when memory limits are exceeded. Recycling based on memory limits is not usually necessary in a 64-bit environment and should be disabled. Unnecessary recycling can result in dropped requests from the recycled worker process and slow performance for end users making requests to the new worker process. If the working set of your worker process grows without bound, analyze the set of applications and components that run in the process to determine whether one of them is leaking memory.
Remedy
In the Internet Information Services Manager, uncheck any memory-based maximums set for the application pools named above. For more information about this rule, see "http://go.microsoft.com/fwlink/?LinkID=142692".
Failing servers
[web front end server name]
tbd

Checking the Recycling Conditions for all of the application pools in IIS on that machine, I didn't find any that had Memory-Based Maximums set.

I then performed an IISRESET on that machine and re-analyzed the health rule, but found that the problem persisted.

Checking SharePoint application pools against the application pools found in IIS using, 

$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$contentService.ApplicationPools | ft name,ID -auto

I found that one application pool in this list was not found in IIS.  It was a test SharePoint application pool I had created previously and forgotten about.  I then removed this SharePoint application pool using

$contentService.ApplicationPools.Remove("[AppPoolID]")

and then re-analyzed the health rule and found that the problem had been resolved.

Solution

  • On the target SharePoint server, get a listing of the SharePoint application pools and compare this list against what you see in IIS.  If there are one or more application pools in SharePoint that are not found in IIS, remove these from SharePoint and then re-analyze the problem.

References

Notes

  • Thanks to ieDaddy for pointing me to the solution