Azure 缓存错误代码:SubStatus超出了这一小时的配额限制
我正在开发一个托管在 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。我在两个实例上运行,我认为这意味着我总共使用了两个实例连接。
请帮助我了解我做错了什么以及我可以做些什么来解决这个问题。
I'm working on an MVC 3 site which is hosted in Windows Azure that is configured to use the DistributedCacheSessionStateStoreProvider for session state which, in turn, uses Azure caching internally. The cache is configured as:
<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>
The session provider is configured as
<sessionState mode="Custom" customProvider="AppFabricCacheSessionStoreProvider">
<providers>
<add name="AppFabricCacheSessionStoreProvider" type="Microsoft.Web.DistributedCache.DistributedCacheSessionStateStoreProvider, Microsoft.Web.DistributedCache" cacheName="default" useBlobMode="true" />
</providers>
</sessionState>
We've had this in place since April but just recently started using the session to store a little bit more data. Our test caching service is 128 MB, which is said to allow 5 concurrent connections. The most we've used of this service at any given time, according to the Azure management console, is 0.34 MB.
In our logs we're seeing this exception appear quite often:
ErrorCode:SubStatus:There is a temporary failure. Please retry later. (The request failed, because you exceeded quota limits for this hour. If you experience this often, upgrade your subscription to a higher one). Additional Information : Throttling due to resource : Connections
According to the documentation I've read, the data cache client by default has maximum connections set to 1. I'm running on two instances, which I assume would mean I'm using two total connections.
Please help me understand what I'm doing wrong and what I can do to resolve this problem.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您不仅仅会受到存储使用的限制。您还受到每小时事务数和每小时带宽的限制。对于 128MB 缓存:
您是否会遇到这两个边界条件之一?
有关 AppFabric 缓存 SLA 的更多详细信息,请参阅此 MSDN 博客文章。
You're not throttled just on storage usage. You're also throttled on transactions per hour and bandwidth per hour. For a 128MB cache:
Might you be running into one of these two boundary conditions?
For more details around AppFabric Cache SLA, look at this MSDN blog post.