Wednesday, November 4, 2015

Newly installed SharePoint 2013 is very slow

Hey Mates,

Is your SharePoint 2013 is behaving slow even after a new and fresh installation? This post may help you to find one of its root cause and the fix.

I have just installed a fresh copy of SharePoint 2013 in my farm and everything seems to be working perfect. No customizations no other custom solutions, just a very fresh out of the box installation of SharePoint 2013.

I have used different service accounts for different purposes like Search Service, User Profile Service, Distributed Cache Service.

Noticed the BOLD? The reason i bold Distributed Cache Service is, it was the reason in my case for slowness in farm and by default SharePoint 2013 configures this service using the same account you have configured the farm, in most cases its the Domain\SPFARM account. And later on SharePoint complains in Health Analyzer that you are using the same account for other services (in current case for Distributed Cache Service) which you are using to run SharePoint Administration Service and SharePoint Timer Service. Bad...! :-/

I decided to change the service account for Distributed Cache from Domain\SPFARM to something like Domain\SPSVCDISTCACHE and as soon as i changed the account my entire SharePoint farm went very slow. Even Central Administration was taking more than 6 seconds to load and navigating inside the Central Administration was also talking almost same. There are few steps i took and fixed the issue.

Temporary Fix:
I googled around and found this article that says its the Distributed Cache which is causing problem. Stopping the Distributed Cache fixed the problem temporarily.

Permanent Fix:

I started the Distributed Cache again and checked the logs. Supersized to found that even in a new installation of SharePoint 2013, Distributed Cache is crashing after changing the service account. Here is what i have found in ULS logs. If you have the same error, you are at the right place to solve it.

11/04/2015 18:42:21.93 w3wp.exe (0x3F78)                       0x063C SharePoint Foundation         DistributedCache               ah24w Unexpected Unexpected Exception in SPDistributedCachePointerWrapper::InitializeDataCacheFactory for usage 'DistributedLogonTokenCache' - Exception 'Microsoft.ApplicationServer.Caching.DataCacheException: ErrorCode<ERRCA0017>:SubStatus<ES0006>:There is a temporary failure. Please retry later. (One or more specified cache servers are unavailable, which could be caused by busy network or servers. For on-premises cache clusters, also verify the following conditions. Ensure that security permission has been granted for this client account, and check that the AppFabric Caching Service is allowed through the firewall on all cache hosts. Also the MaxBufferSize on the server must be greater than or equal to the serialized object size sent from the client.). Additional Information : The client was trying to co... 923f3e9d-2485-60b2-3171-3b7fb3e7523111/04/2015 18:42:21.93* w3wp.exe (0x3F78)                       0x063C SharePoint Foundation         DistributedCache               ah24w Unexpected ...mmunicate with the server : net.tcp://PROD-SPAPP01:22233     at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody, RequestBody reqBody)     at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCacheProperties(RequestBody request, IClientChannel channel)     at Microsoft.ApplicationServer.Caching.DataCacheFactory.GetCache(String cacheName)     at Microsoft.SharePoint.DistributedCaching.SPDistributedCachePointerWrapper.InitializeDataCacheFactory()'. 923f3e9d-2485-60b2-3171-3b7fb3e75231

I checked into Event Viewer and found the below errors. Keep in mind that Distributed Cache service relies on AppFabric Caching Service which you can found in services console (services.msc).

Make sure the account you are using for Distributed Cache must be in below admin groups.

Next step is you have to check if the service account as proper login permissions in SQL server. Microsoft describes that here. In my case i the service account was not granted permissions in SQL server. Granting permissions securityadmin in SQL server fixed the issue and the AppFabric Service started successfully. In a result the Distributed Cache service started and page load time decreased to more that 6 seconds to lest then 1 second (actually in milliseconds). NO MORE ERRORS IN EVENT VIEWER :)

After the page load time get normal and expected, i ran to another problem that Distributed Cache service is still messing with me. :o)

I saw the ULS logs and found that its filling up by Distributed Cache. Here is what i got in ULS.

Calling... SPDistributedCacheClusterCustomProvider:: BeginTransaction
Successfully executed... SPDistributedCacheClusterCustomProvider:: BeginTransaction
Calling... SPDistributedCacheClusterCustomProvider:: GetValue(object transactionContext, string type, string key).
Successfully executed... SPDistributedCacheClusterCustomProvider:: GetValue(object transactionContext, string type, string key).
I read this by Microsoft and noticed that Distributed Cache and AppFabric services uses the below ports which should be accessible in firewall. SharePoint by default manages these ports. In my case i was using a proxy for my server in Internet Explorer. You can enable/disable the proxy or try by opening ports in firewall. I moved ahead with enabling/disabling proxy and in my case it fixed the issue.

  • 22233
  • 22234
  • 22235
  • 22236
Hope this article will solve someone's problem or give a hint to fix the problem.

Happy SharePointing...! :)

No comments:

Post a Comment