locked
Problems with Azure Appfabric cache service. RRS feed

  • Question

  • Hi Team,

    We are using Session State Provider to store the session data in the Azure Appfabric caching.  We are testing with the small piece of code by updating the session object 5MB at a time, so that we can handle the data in the applicaiton, in the event of eviction how the Azure cache behaves.

    We have configured the Azure appfabric cache with 128 MB size in the region United States (South/Central).  We could not able to put the data in the Azure Appfabric cache after some time around, uploading 20 MB we are getting the below mentioned error.  We tried even by enabling the retry logic in the configuration file where the session state is configured as give in this link (http://msdn.microsoft.com/en-us/library/windowsazure/gg185682.aspx) by configuring the as below, we are not sure whether the retry logic is working or not.

        <sessionState mode="Custom" customProvider="AppFabricCacheSessionStoreProvider">
          <providers>
            <add name="AppFabricCacheSessionStoreProvider"
                 type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache"
                 cacheName="default"
                 dataCacheClientName="default"
                 applicationName="XXXXXXX"
                 retryInterval="00:00:10"
                 retryCount="10"
                 />
          </providers>
        </sessionState>

    ERROR
    [TimeoutException: The socket transfer timed out after 00:00:00. You have exceeded the timeout set on your binding. The time allotted to this operation may have been a portion of a longer timeout.]
       System.ServiceModel.Channels.SocketConnection.SetWriteTimeout(TimeSpan timeout, Boolean synchronous) +16258404
       System.ServiceModel.Channels.SocketConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout) +247
       System.ServiceModel.Channels.SocketConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout, BufferManager bufferManager) +44
       System.ServiceModel.Channels.BufferedConnection.WriteNow(Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout, BufferManager bufferManager) +456
       System.ServiceModel.Channels.BufferedConnection.Write(Byte[] buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout, BufferManager bufferManager) +117
       System.ServiceModel.Channels.FramingDuplexSessionChannel.OnSend(Message message, TimeSpan timeout) +460
       System.ServiceModel.Channels.OutputChannel.Send(Message message, TimeSpan timeout) +230
       Microsoft.ApplicationServer.Caching.CacheResolverChannel.Send(Message message, TimeSpan timeout) +101
       Microsoft.ApplicationServer.Caching.WcfClientChannel.SendMessage(EndpointID endpoint, Message message, TimeSpan timeout, WaitCallback callback, Object state, Boolean async) +2164

    [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.)]
       Microsoft.ApplicationServer.Caching.DataCache.ThrowException(ResponseBody respBody) +693
       Microsoft.ApplicationServer.Caching.DataCache.ExecuteAPI(RequestBody reqMsg, IMonitoringListener listener) +107
       Microsoft.ApplicationServer.Caching.DataCache.InternalPutAndUnlock(String key, Object value, DataCacheLockHandle lockHandle, TimeSpan timeout, DataCacheTag[] tags, String region, IMonitoringListener listener) +658
       Microsoft.ApplicationServer.Caching.<>c__DisplayClass8a.<PutAndUnlock>b__89() +643
       Microsoft.ApplicationServer.Caching.EmptyListener.Microsoft.ApplicationServer.Caching.IMonitoringListener.Listen(Func`1 innerDelegate) +57
       Microsoft.ApplicationServer.Caching.DataCache.PutAndUnlock(String key, Object value, DataCacheLockHandle lockHandle, TimeSpan timeout) +385
       Microsoft.Web.DistributedCache.<>c__DisplayClass19.<PutAndUnlock>b__18() +52
       Microsoft.Web.DistributedCache.<>c__DisplayClass2e`1.<PerformCacheOperation>b__2d() +19
       Microsoft.Web.DistributedCache.DataCacheRetryWrapper.PerformCacheOperation(Action action) +189
       Microsoft.Web.DistributedCache.DataCacheForwarderBase.PerformCacheOperation(Func`1 func) +167
       Microsoft.Web.DistributedCache.DataCacheForwarderBase.PutAndUnlock(String key, Object value, DataCacheLockHandle lockHandle, TimeSpan timeout) +162
       System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +929
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +80
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +266


    Here we have few questions related to windows Azure appfabric cache.

    1. We are using the free subscription provided by Microsoft for 6 months, is this some thing causing issue?
    2. The portal is not showing the cache size details correctly.
    3. After certain amount of time it is resetting the CurrentSize column to 0.00MB.
    4. What is the time interval the portal will refresh the cache details?

    Thanks in advance.
    sivakumar.

    Tuesday, April 10, 2012 11:23 AM

Answers

  • Hi sivalumar,

    According to your description, if you want to make sure your free subscription is available, try to connect to our support on:

    https://support.microsoft.com/oas/default.aspx?gprid=14928&st=1&wfxredirect=1&sd=gn

    As far as i know, Windows Azure free trial account expire time is 3 months and resources limited, do you gor a special free subcription from Microsoft?  The Free trial Cache limit is 128 MB (in total), do you ever enable cache service in other roles?

    More details:

    http://www.windowsazure.com/en-us/offers/ms-azr-0018p

    For portal refresh cache details, the cache default expire time is 48 hours, but you can programmatically specify a smaller time-to-live value for items added to the cache with the API. Such like:

    var cacheMaxAge = (60 * 60); // 3600 second (1 hour) caching
    
    blobFile.Properties.CacheControl = "max-age=" + cacheMaxAge;
    
    Hope this helps.

    Please mark the replies as answers if they help or unmark if not. If you have any feedback about my replies, please contact msdnmg@microsoft.com Microsoft One Code Framework

    • Marked as answer by Arwind - MSFT Monday, April 16, 2012 8:26 AM
    Wednesday, April 11, 2012 3:21 AM