我正在开发一个托管在 Windows Azure 中的 MVC 3 站点,该站点配置为使用 DistributedCacheSessionStateStoreProvider 来获取会话状态,而会话状态又在内部使用 Azure 缓存。缓存配置为:
<dataCacheClients>
<dataCacheClient name="default">
<hosts>
<host name="test.cache.windows.net" cachePort="XXXX" />
</hosts>
<securityProperties mode="Message">
<messageSecurity authorizationInfo="XXXX">
</messageSecurity>
</securityProperties>
<transportProperties receiveTimeout="45000" />
</dataCacheClient>
</dataCacheClients>
会话提供程序配置为
<sessionState mode="Custom" customProvider="AppFabricCacheSessionStoreProvider">
<providers>
<add name="AppFabricCacheSessionStoreProvider" type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache" cacheName="default" useBlobMode="true" />
</providers>
</sessionState>
自 4 月以来,我们已经将其部署到位,但最近才开始使用会话来存储更多数据。我们的测试缓存服务为 128 MB,据说允许 5 个并发连接。根据 Azure 管理控制台,我们在任何给定时间使用此服务的最大容量为 0.34 MB。
在我们的日志中,我们经常看到这个异常出现:
错误代码:子状态:暂时失败。请稍后重试。(请求失败,因为您超出了这一小时的配额限制。如果您经常遇到这种情况,请将您的订阅升级到更高的订阅)。附加信息:由于资源限制:连接
根据我读过的文档,默认情况下,数据缓存客户端的最大连接数设置为 1。我在两个实例上运行,我假设这意味着我总共使用了两个连接。
请帮助我了解我做错了什么以及我可以做些什么来解决这个问题。