ASP.NET MVC3 中的随机会话超时
我有一个获得随机会话超时的应用程序。 (Windows 2008 R2、.NET 4.0 上的 IIS 7.5)
我尝试了以下操作:
- 检查应用程序日志是否 w3wp.exe 进程崩溃,但没有任何条目。
- 在应用程序池中禁用快速故障保护,
- 将其移至 SQL Server 状态提供程序,以确保负载均衡器粘性会话不会 问题。 (我们使用 kemp loadmaster)。
- 确保没有其他应用程序使用同一应用程序池。
- 检查被调用程序集线程中的异常是否得到正确处理。 (使用抛出新异常进行模拟)并且错误处理是正确的。
- 确保所有 4 个网络服务器上的 webconfig 中的validationKey和decryptionKey设置为相同的密钥。
我现在不知道如何发现这个邪恶的错误。有什么建议吗?我无法在调试器中在本地计算机上重现该问题。
有一点可能很重要,从页面 1 移动到页面 2(经常发生会话丢失)有时需要超过 120 秒,因为第三方系统是通过 tcp 套接字连接的。
i have an application which gets random session timeouts. (IIS 7.5 on Windows 2008 R2, .NET 4.0)
i tried the following:
- checked the application log if the w3wp.exe process was crashed, but there is no entry.
- disabled in the application pool the rapid fail protection
- moved to the sql server state provider to be sure the loadbalancers sticky session is not
the problem. (we use a kemp loadmaster). - ensured that no other applications use the same application pool.
- checked that exceptions in a thread of a called assembly is correctly handled. (simulated using throw new exception) and the error handling was correct.
- ensured that the validationKey and decryptionKey is set in the webconfig on all 4 webservers to the same key.
i run now out of ideas how to spot this evil bug. any suggestions? i cannot reproduce the problem on my local machine in the debugger.
one point which is maybe important, the move from page 1 to page 2 where the session loss often happens, takes sometimes more than 120 seconds, because of a third party system which is connected via tcp socket.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
你好,史努比,你链接到了我的问题,因为它们很相似,
当我的应用程序池崩溃时,我尝试了这个解决方案。如果您的应用程序崩溃,这可能会有所帮助
http://support.microsoft.com/kb/911816
解决方案停止修复黑客让我应用程序池启动但没有解决问题,
如果您的应用程序池仍然完好无损,您可以尝试 ELMAH,因为这对我帮助很大
http://code.google.com/p/elmah/
您可以使用此代码让 ELMAH 处理非托管异常
http://code.google.com/p/elmah/issues/详细?id=199
我很好奇这是否是MVC 3.0与.net 4.0的问题
因为我有几个非常相似的应用程序使用 MVC 2.0 运行,没有任何问题,
当我迁移到 MVC 3.0 时才开始
HI Snoopy you linked to my question as they are similar,
As my appool was crashing I tried this solution. If your appool crash's this may help
http://support.microsoft.com/kb/911816
the solution stop fix hack kept my app-pool up but didn't fix the problem,
If your app-pool is still intact you might try ELMAH as this helped me a lot
http://code.google.com/p/elmah/
you can use this code to get ELMAH to handle unmanaged exceptions
http://code.google.com/p/elmah/issues/detail?id=199
I am curious if it is MVC 3.0 problem with .net 4.0
as i have several very similar apps running using MVC 2.0 with no problems,
Only started when I moved to MVC 3.0
它发生在单个服务器上吗?当然听起来像是网络农场的问题。
您可以更改您的应用程序,以便不使用第 3 方应用程序进行测试吗?
你必须消除一些部分,直到故障消失,然后再添加回来。恢复第 3 方应用程序、重新打开其他服务器等。
Does it happen on a single server? Sure sounds like an issue with the web-farm.
Can you alter your app so you don't use the 3rd-party app for testing?
You have to eliminate pieces until the failure goes away, then add stuff back. Restore 3rd party app, turn other servers back on, etc.