SharePoint24x7 It's all about SharePoint.

3Nov/113

Fix it – Configuring Object Cache service

Posted by Joy

If you are using Web Content Management (WCM) solutions implemented with SharePoint 2010 Publishing Infrastructure features, you will notice following Critical error in your server Event Log.

Capture9

What does it mean and how do you fix this?

This error is generated by SharePoint’s Object Cache service. In order to get rid of this error, you will have to configure Object Cache service.

What is Object Cache service?

Object Cache is a very powerful built-in service in SharePoint 2010 Publishing Infrastructure which instructs every Web Front End (WFE) to cache object properties in order to boost the performance. This reduces the load on SQL Server tremendously by reducing number of round trips required to retrieve same data from the content databases. In scenarios where you have Web Content Management solutions which go through less content changes, by configuring Object Cache, you can reduce the latency and increase the throughput.

Configuring Object Cache is all about configuring User Policies for each and every Web Applications. Object Cache is configured at the Web Application level and you need to have 02 AD user accounts for configuring Portal Super User and Portal Super Reader. Portal Super User account has full control and Portal Super Reader account has full read-only access.

Let us begin the configuration.

Task 1 – Create required AD accounts

You need to create 02 service accounts in order to configure Portal Super User and Portal Super Reader. Go to Active Directory and create 02 service accounts.

I already have 02 service accounts created named, SP_ObjectCacheUser and SP_ObjectCacheReader.

Capture1

Task 2 – Configure Object Cache User Accounts using CA

Initial configuration done using CA.

  1. Fire up the SharePoint 2010 Central Administration site by navigating to Start –> All Programs –> Microsoft SharePoint 2010 Products –> SharePoint 2010 Central Administration.
  2. Select Manage web applications link from the Application Management group.
  3. Select the web application you are planning to configure Object Cache. In my environment, for this demo, I’m selecting SharePoint – 80 web application.
  4. Click the User Policy from the Policy group in the ribbon.
    Capture2
  5. Click Add Users link in the Policy for Web Application dialog box.
    Capture3
  6. Select (All Zones) for the Select the Zone field in the Add Users dialog box and click Next > button.
    Capture4
  7. Enter the Portal Super User account for the Choose Users field and select Full Control from the Choose Permissions section and click Finish. In my demo, I have configured SP_ObjectCacheUser as the Portal Super User.
    Capture5
  8. Click Add Users link again in the Policy for Web Application dialog box.
  9. Select (All Zones) for the Select the Zone field in the Add Users dialog box and click Next > button.
  10. Enter the Portal Super Reader account for the Choose Users field and select Full Read from the Choose Permissions section and click Finish. In my demo, I have configured SP_ObjectCacheReader as the Portal Super Read.
    Capture6
  11. Policy for Web Application dialog box now will look following.
    Capture7

Task 3 – Committing configuration changes using PowerShell

Final step is to commit configuration changes using PowerShell.

  1. Fire up SharePoint 2010 Management Shell by navigating to Start –> All Programs –> Microsoft SharePoint 2010 Products –> SharePoint 2010 Management Shell.
  2. Enter the following PowerShell commands to update the settings. Change the Web Application name placeholder depending on the name of the Web Application.$wa = Get-SPWebApplication – Identity “SharePoint – 80
    $wa.Properties[“portalsuperuseraccount”] = “CONTOSO\SP_ObjectCacheUser
    $wa.Properties[“portalsuperreaderaccount”] = “CONTOSO\SP_ObjectCacheReader
    $wa.Update()

    Capture8

Now you will not see the earlier Critical error in your server Event Log as well as you will experience a reduced latency and an improved throughput.