Soru App Fabric problem

  • 03 Mayıs 2012 Perşembe 08:11
     
      Kod İçerir

    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.

Tüm Yanıtlar

  • 07 Mayıs 2012 Pazartesi 07:06
     
     
    Anyone please?
  • 09 Mayıs 2012 Çarşamba 08:50
     
     
    Do you have the exception type? Is there any inner exception? When you got this exception? What operation did you do when exception happen?
  • 11 Mayıs 2012 Cuma 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

  • 19 Mayıs 2012 Cumartesi 07: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

  • 21 Mayıs 2012 Pazartesi 16:43
     
     
    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.
  • 22 Mayıs 2012 Salı 07: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.

  • 23 Mayıs 2012 Çarşamba 06: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

  • 24 Mayıs 2012 Perşembe 06: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.

  • 25 Mayıs 2012 Cuma 07: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

  • 28 Mayıs 2012 Pazartesi 06: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 

  • 29 Mayıs 2012 Salı 06:55
     
     

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

    Thanks,

    Bharath