Unanswered App Fabric problem

  • Thursday, May 03, 2012 8:11 AM
     
      Has Code

    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.

All Replies

  • Monday, May 07, 2012 7:06 AM
     
     
    Anyone please?
  • Wednesday, May 09, 2012 8:50 AM
     
     
    Do you have the exception type? Is there any inner exception? When you got this exception? What operation did you do when exception happen?
  • Friday, May 11, 2012 3:20 PM
     
     

    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

  • Saturday, May 19, 2012 7:50 AM
     
     

    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

  • Monday, May 21, 2012 4:43 PM
     
     
    The 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.
  • Tuesday, May 22, 2012 7:05 AM
     
     

    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.

  • Wednesday, May 23, 2012 6:11 AM
     
     

    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

  • Thursday, May 24, 2012 6:26 AM
     
     

    Thanks for your reply. I didnt modify the retry settings.

    For the second point the answer is yes as I have configured High Availability.

  • Friday, May 25, 2012 7:44 AM
     
     

    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

  • Monday, May 28, 2012 6:27 AM
     
     

     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 

  • Tuesday, May 29, 2012 6:55 AM
     
     

    You can information on how to do this on this link http://msdn.microsoft.com/en-us/library/windowsazure/gg185682

    Thanks,

    Bharath