App Fabric problem
-
2012年5月3日 8:11
Hi,
I have an MVC3 application that is hosted on IIS 7.5 with app fabric. The problem is that sometimes I get the following exception
Message: ErrorCode<ERRCA0017>:SubStatus<ES0005>:There is a temporary failure. Please retry later. (There was a contention on the store.)
StackTrace: at Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody)
at Microsoft.ApplicationServer.Caching.DataCache.InternalGetAndLock(String key, TimeSpan timeout, DataCacheLockHandle& lockHandle, String region, Boolean lockKey)
at Microsoft.ApplicationServer.Caching.DataCache.GetAndLock(String key, TimeSpan timeout, DataCacheLockHandle& lockHandle)I dont use any code programmatically to access/query app fabric. Nothing at all. It is just there for performance only. I dont know whats causing that and I couldnt find anything on the Internet.
Anyone can help me please.
全部回复
-
2012年5月7日 7:06Anyone please?
-
2012年5月9日 8:50Do you have the exception type? Is there any inner exception? When you got this exception? What operation did you do when exception happen?
-
2012年5月11日 15:20
Hi pantonis,
In your application, do you perform concurrent operations on the same set of cache items? This exception is usually seen when that happens.
Thanks,
Bharath
-
2012年5月19日 7:50
Hi,
I dont use any code for app fabric at all. The only thing that I have 'cached' is 2 ConcurrentDictionary<int, List<T>>. We only use appfabric for storing SessionData like forms auth.
Thanks
-
2012年5月21日 16:43The session state provider does a GetAndLock followed by PutAndUnlock for while writing Session data. This seems like a transient error which you can handle and retry in your application.
- 已建议为答案 Bharath B S[MSFT]Microsoft Employee 2012年5月21日 16:43
- 取消建议作为答案 Bharath B S[MSFT]Microsoft Employee 2012年5月23日 6:11
-
2012年5月22日 7:05
Thanks for your reply. As I said I dont have any code implemented for AppFabric. The only code I have is in my web.config for sessionState to use appfabric. I get this error all the time not transiently.
-
2012年5月23日 6:11
Hi Patonis,
You don't need to write any AppFabric code. When, in your web.config, you specify to use the caching session state provider, it would implicitly use AppFabric APIs to store session data. Nevertheless, the fact that you are seeing this all the time doesn't sound ideal. I have a few questions :-
1. Did you modify the default retry settings (retryInterval or retryCount) in the session state configuration settings? http://msdn.microsoft.com/en-us/library/ee790859(v=azure.10).aspx
2. Seems unlikely, but have you by any chance, configured High Availability for your cache ? http://msdn.microsoft.com/en-us/library/ee790974(v=azure.10).aspx
Thanks,
Bharath
-
2012年5月24日 6:26
Thanks for your reply. I didnt modify the retry settings.
For the second point the answer is yes as I have configured High Availability.
-
2012年5月25日 7:44
Hi Patonis,
Since you've configured HA, you would hit this error in some cases. When an object is to be stored in the cache, it gets stored in the primary first and then waits for an Ack from the secondary where it is to be stored. In this time period, if an attempt is made the access the object, you would get this error. Typically, the whole process shouldn't take much time but it can get delayed due to some underlying network issue. Upon disabling HA, you shouldn't see this error.
The session state provider typically handles all retryLater exceptions of such kind and retries based on the retry config. You can increase the retryInterval / retryCount in the session state configuration settings to make it work with HA.
Thanks,
Bharath
-
2012年5月28日 6:27
I cannot find an example to where I should use this setting and what is the value of it. Can you post an example?
Thanks
-
2012年5月29日 6:55
You can information on how to do this on this link http://msdn.microsoft.com/en-us/library/windowsazure/gg185682
Thanks,
Bharath

