Build a Health Analyzer Rule or Fixit Package for the Most Common Distributed Cache Problems
Create either a SP2013/SP2016 health analyzer rule, a Microsoft Fix It package and KB article, a SETH/UDE tool package, and a SPRAPaaS component that that checks for the most commong configuration problems with distributed cache. Examples:
(1) check to make sure that there are no more than two dcache hosts per farm.
(2) check to make sure that the size of the dcache is less than 16 GB and is proportionate to the total and/or available amount of RAM on the servers. Offer to run Update-SPDistributedCacheSize -CacheSizeInMB at ideal settings for the administrator. (See http://blogs.technet.com/b/sp/archive/2013/05/29/calculate-and-set-distributed-cache-size.aspx)
(3) Confirm that the CU level is at CU3 or higher (preferably CU7 or latest) and check the DistributedCacheService.exe.config file to ensure that "backgroundGC" is set to "true" per https://support.microsoft.com/en-us/kb/2787717.
(4) Confirm windows fire wall ports are open for 22233-22236 on the dcache servers.
(5) Check settings per https://technet.microsoft.com/en-us/library/jj219613.aspx?f=255&MSPPError=-2147217396#finetune. Especially confirm whether MaxConnectionsToServer is set to either 1 or no more than the number of processor cores. If it is set to 100, set it to 1. Prompt administrator to see if an automatic fix (optimization) is desired. Some misguided blogs trick people in setting maxconnectionstoserver to 100.
(6) Check for CacheHostInfo is null problems and offer to fix them. Have a feature that offers a deep-digging rebuild of the dcache for emergencies.
(7) Fix the common "Table SPDistributedCacheCalls_Partition12 has 460226560 bytes that has exceeded the max bytes" noise.
(8) Check the clusterconfig.xml file to ensure that MaxBufferSize is still set to 8 mb. Some people change it in the attempt to deal with the Microsoft.ApplicationServer.Caching.DataCacheException errors in ULS saying, "Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client."
Same for me. We have still a lot of problems with dist. cache. Sometimes posts are missing from one day to the other. sometimes only for a couple of users. Had about 5 open calls in the past. always we had to search for the failure for a long time sometimes without a solution. Microsoft, please make newsfeed working well. We started an international rollout last year. Or give us another on prem solution which is working. and please send us an advise how to migrate to this new plattform. some posts are meanwhile very important for our company! Thank you very much.
Chris H. commented
# 7 (Fix the common "Table SPDistributedCacheCalls_Partition12 has 460226560 bytes that has exceeded the max bytes" noise) is probably not something a tool can fix permanently. We fix it and the problem comes back a few days later. It seems more like a bug in the SP2013 code somewhere.
Log Name: Application
Source: Microsoft-SharePoint Products-SharePoint Foundation
Event ID: 8319
Task Category: Usage Infrastructure
Description: Table SPDistributedCacheCalls_Partition3 has 461668352 bytes that has exceeded the max bytes 460175067
ULS . . .
OWSTIMER.EXE (0x9574) 0x13C8 SharePoint Foundation Health ki77 High Table SPDistributedCacheCalls_Partition12 has 460226560 bytes that has exceeded the max bytes 460175067 1bb0529d-6f8e-40e3-a394-ca969b7ab74a
OWSTIMER.EXE (0x9574) 0x13C8 SharePoint Foundation Usage Infrastructure agg3f Critical Table SPDistributedCacheCalls_Partition12 has 460226560 bytes that has exceeded the max bytes 460175067 1bb0529d-6f8e-40e3-a394-ca969b7ab74a
OWSTIMER.EXE (0x9574) 0x13C8 SharePoint Foundation Usage Infrastructure 852u High Called ImportEntries method for usage definition 'Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheCallUsageProvider'. 1bb0529d-6f8e-40e3-a394-ca969b7ab74a
Chris H. commented
SharePoint 2016 Configuration Change to Support AppFabric Background Garbage Collection
SharePoint update Distributed Cache background garbage collection setting
Downloadable script out on TechNet Script Gallery.