Crazy Distributed Cache (AppFabrikCache) SharePoint Server 2013

SharePoint geeks,

well i can not tell you how many time i have repaired this service and it takes my patience exam in every end of week. And i have done many battles with this service. i still couldn’t find the reason why it stop often, if anyone knows that Please let me know. so i thought  should share my experience with other geeks.  just few steps to repair this service.

What Is Distributed Cache Service?

Distributed Cache Service is a customized version of Windows App Fabric deployed in SharePoint 2013.
The Distributed Cache service provides caching functionality to features in SharePoint Server 2013. The Distributed Cache service is either required by or improves performance of the following features:

  • Authentication
  • Newsfeeds
  • OneNote client access
  • Security Trimming
  • Page load performance

There is no GUI for AppFabric so make sure  following 10 named cache containers should be there through this cmd.

Run SharePoint Management Shell and use below cmd this command should return the list of these containers.

  •  Get-Cahce
  1. DistributedDefaultCache
  2. DistributedAccessCache
  3. DistributedActivityFeedCache
  4. DistributedBouncerCache
  5. DistributedLogonTokenCache
  6. DistributedServerToAppServerAccessTokenCache
  7. DistributedSearchCache
  8. DistributedSecurityTrimmingCache
  9. DistributedActivityFeedLMTCache
  10. DistributedViewStateCache

Allocate Memory on Distributed Cache Service

When SharePoint Server 2013 is installed, 10% of the total physical memory is allocated. The Distributed Cache service use 50% of this memory as storage and the other to manage the memory.

This cache size can be increased when:

  • You add more memory on the Server
    • Be aware,  when you add memory to the server, the Distributed Cache isn’t updating by himself. You need to reconfigure the Cache Size.
  • If you have a dedicated caching server
    • You should calculate it so :
  • Determine the total sum of physical memory. Let’s take the example that your server has 16GB of memory.
  • You have to book 2 GB of memory for other processes. So this means 16GB – 2GB = 14GB

Now we have to take the half of this amount and that size is our AppFabric Cache Size : 14GB / 2 = 7GB

Change the Memory allocation

Use this procedure to reconfigure the memory allocation of Cache Size

Get-APCacheHostConfiguration –ComputerName –CachePort  22233

you can also update from Central Administration

Graceful shutdown of the Distributed Cache Service

use SharePoint Management Shell to run these commands

  • Stop-SPDistributedCacheServiceInstance – Graceful
  • Remove-SPDistributedCacheServiceInstance

make sure your Distributed Cache service using Farm Account  if not so you first need to change its service account. below are the commands through which you can change Distributed Cache service account.

  • $farm = Get-SPFarm
  • $cacheService = $farm.Services | where {$_.Name –eq “AppFabricCachingService”}
  • $account = Get-SPManagedAccount –Identity  domainnameUSER_NAME
  • $cacheService.ProcessIdentity.CurrentIdentityType = “USER”
  • $cacheService.ProcessIdentity.ManagedAccount = $account
  • $cacheService.ProcessIdentity.Update()
  • $CacheService.ProcessIdentity.Deploy()

Add new Service Instance 


after restart Cahce Cluster just run IISRESET cmd.

That’s it you done.

Happy SharePointing 😉


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s