0

We have an application page that stores some information in the view state, and uses UpdatePanels. We have a rare, intermittent bug that occurs in SharePoint 2013 only whereby sometimes, after a button click (that should trigger a partial refresh via an UpdatePanel), the page goes back to it's blank state.

I finally caught this with an interesting ULS log:

Unexpected error occurred in method 'GetObject' , usage
'SPViewStateCache' - Exception
'Microsoft.ApplicationServer.Caching.DataCacheException:
ErrorCode<ERRCA0018>:SubStatus<ES0001>:The request timed out.

I was able to reproduce the bug once by stopping/starting the distributed cache service while working with the page (however, I couldn't do it consistently).

So, first of all, is this likely the culprit, and second, is it possible to disable the ViewStateCache for a particular page?

This is an admin page that only a few people would even have access to, and I don't think caching is helping anything at the best of times.

-1

You can increase the timeout with Powershell. Take a look at this blog post for the commands. http://www.dmcinfo.com/latest-thinking/blog/articletype/articleview/articleid/8657/fix-sharepoint-2013-distributed-cache-timeouts.aspx

$LogonTokenCache = Get-SPDistributedCacheClientSetting -ContainerType DistributedLogonTokenCache
 $LogonTokenCache.RequestTimeout = 300 
Set-SPDistributedCacheClientSetting -ContainerType DistributedLogonTokenCache -DistributedCacheClientSettings $LogonTokenCache 


$ViewStateCache = Get-SPDistributedCacheClientSetting -ContainerType DistributedViewStateCache
 $ViewStateCache.RequestTimeout = 300 
Set-SPDistributedCacheClientSetting -ContainerType DistributedViewStateCache -DistributedCacheClientSettings $ViewStateCache

By running Get-SPDistributedCacheClientSetting -ContainerType CacheName you are able to see what the current request timeout is set to. By default, Microsoft sets the value of the RequestTimeout to 20 milliseconds. As a result, if the server is under any significant stress you will start seeing a lot of misses on calls to the cache.

PS C:\Users\user> $viewstatecache 
ChannelInitializationTimeout : 60000 
ConnectionBufferSize : 131072 
MaxBufferPoolSize : 268435456 
MaxBufferSize : 8388608 
MaxOutputDelay : 2 
ReceiveTimeout : 60000 
ChannelOpenTimeOut : 20 
RequestTimeout : 300 
MaxConnectionsToServer : 99

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.