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

Use-CacheCluster
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 

Add-SPDistributedCacheServiceInstance
Restart-CacheCluster

after restart Cahce Cluster just run IISRESET cmd.

That’s it you done.

Happy SharePointing 😉

Advertisements

SharePoint 2013 Support for Windows Server 2012 R2

Hi Folks!

well since morning i have been working on demo Virtual Machine and i have faced lots of issues while  installing  SharePoint 2013 on WindowsServer 2012 R2. but finally after 2 hours i have installed the SharePoint 2013 Server on WindowsServer 2012 R2 and configured most of the services but when i have configured Workflow service and try to register my Test site with Workflow Farm it was refusing and PowerShell was throwing errors like Register-SPWorkflowService : The remote server returned an error: (404) Not Found. Then i tried to create new scope with            –ScopeName  but it was also not working. Unfortunately i have wasted whole day to figure out the issue but couldn’t find . then i dug more in Google and Bing search and i found the article which says that  currently SharePoint2013 is not supported for installation on computer running WindowsServer 2012 R2. Here is the link you can find more information TechNet. Please comment on this blog If anyone has information regarding this issue i would appreciate.

“Currently, Microsoft SharePoint Server 2013 is not supported for installation on computers running the Windows Server 2012 R2 operating system.   Installing SharePoint Server 2013 on a computer that is running Windows Server 2012 R2 could lead to unexpected behavior, therefore, Microsoft does not support SharePoint Server 2013 in Windows Server 2012 R2.  SharePoint Server 2013 with Service Pack 1 and SharePoint Foundation 2013 with Service Pack 1 will offer support for Windows Server 2012 R2. The release date for Service Pack 1 for SharePoint Server 2013 and SharePoint Foundation 2013 is to be determined. This article will be updated as more information becomes available.”

Happy SharePointing 🙂