1

我刚刚注意到,在运行应用程序时,我会定期收到一条错误消息。

Server Error in '/' Application.
Buffer cannot be null.
Parameter name: buffer
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentNullException: Buffer cannot be null.
Parameter name: buffer

堆栈跟踪:

    [ArgumentNullException: Buffer cannot be null.
Parameter name: buffer]
   System.IO.MemoryStream..ctor(Byte[] buffer, Boolean writable) +12627669
   MemcachedProviders.Session.Common.Deserialize(HttpContext context, Byte[] serializedItems, Int32 timeout) +47
   MemcachedProviders.Session.Db.SQLDbOperations.GetItem(String strSessionId, String strApplicationName, Int32 iTime, HttpContext context, Boolean lockRecord, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actionFlags) +1221
   MemcachedProviders.Session.SessionStateProvider.GetItemExclusive(HttpContext context, String id, Boolean& locked, TimeSpan& lockAge, Object& lockId, SessionStateActions& actions) +1069
   System.Web.SessionState.SessionStateModule.GetSessionStateItem() +178
   System.Web.SessionState.SessionStateModule.PollLockedSessionCallback(Object state) +299

[HttpException (0x80004005): Exception of type 'System.Web.HttpException' was thrown.]
   System.Web.SessionState.SessionStateModule.EndAcquireState(IAsyncResult ar) +11513726
   System.Web.AsyncEventExecutionStep.OnAsyncEventCompletion(IAsyncResult ar) +107

我们的应用程序使用 Enyim memcached 和 MemcachedProviders 并在负载平衡的环境中运行。

该应用程序做了很多管理 PDF 报告和编译响应然后生成最终报告 pdf 的工作。所以我们经常使用流。

这个问题似乎只影响我们的管理应用程序,因为我们还公开了一个 Web 服务,而且在查看服务定义和 WSDL 时我从来没有遇到过错误。

通过查看数据库中的会话表,我可以看到它们正在被创建,但是它们中的许多在 SessionItems 字段中具有空值,并且锁定标志设置为 1。数据时间戳似乎与空缓冲区错误发生相关。

这是缓冲区设置不正确或最大化的情况吗?

4

0 回答 0