当我关闭托管用户会话的三节点集群中的一个节点时,我的 Web 应用程序中出现以下异常。
会话缓存也有辅助,没有驱逐。
这是错误消息和堆栈:
Exception information:
Exception type: DataCacheException
Exception message: ErrorCode<ERRCA0022>:Cache::GetAndLock: There is a temporary failure, please retry after some time.
Stack trace: at Microsoft.Data.Caching.DataCache.ExecuteAPI(RequestBody reqMsg, String apiName)
at Microsoft.Data.Caching.DataCache.InternalGetAndLock(String key, TimeSpan timeout, DataCacheLockHandle& lockHandle, String region)
at Microsoft.Data.Caching.DataCache.GetAndLock(String key, TimeSpan timeout, DataCacheLockHandle& lockHandle)
at Microsoft.Data.Caching.DataCacheSessionStoreProvider.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions)
at System.Web.SessionState.SessionStateModule.GetSessionStateItem()
at System.Web.SessionState.SessionStateModule.PollLockedSessionCallback(Object state)
如果我稍后重试请求,该消息将消失。为什么我首先收到此消息,并且服务器不应该自行确定主机已关闭并切换到其他客户端之一。我在 web.config 文件中将会话客户端定义为简单,以防万一它是路由问题,但问题仍然存在。