torsdag 23 maj 2013

Application pools recycle when memory limits are exceeded - SP2010

Each time I configure a new SharePoint farm, I have to wrestle with the Health Analyzer rules.
A good one is:
SharePoint 2010 – Application pools recycle when memory limits are exceeded.

If you check the provided technet article in the rule, you'll get the following (quite misleading) solution.

  1. In the Internet Information Services management console, in the Connections pane, expand the tree view, and then click Application Pools.
  2. In the Application Pools list, right-click the application pool on which you want to disable the memory limits, and then click Recycling.
  3. In the Edit Application Pool Recycling Settings dialog box, in the Memory Based Maximums section, clear the Virtual memory usage (in KB) and Private memory usage (in KB) check boxes, and then click Next.
     
I discovered this rule on a quite fresh install, hence no changes done to Virtual memory usage in IIS.
Turns out that the reason for this issue was that I had stopped the service "SharePoint Foundation Web Application" on my app servers.
This lead to the rule not finding all application pools as it was expecting to find.

Since you can't set rules for specific servers (not even in sp2013), the easiset solution is to disable the rule.



Next simplest solution is to add the missing application pool to the servers.
The following powershell script looks for missing application pools:

$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$contentService.ApplicationPools | fl Name