asp.net state service问题

dean615 2017-03-27 11:16:53
在线MIS系统遇到一个问题,Session 保存使用了 StateServer 模式,时间久了,会报下面的错误,看日志也看不出来什么问题。
StateServer 服务确认是打开的,出现异常后重启asp.net state service服务,重启IIS 都没用,必须重启服务器,
请问下会是什么原因,如何解决?
配置如下:


异常如下:


...全文
932 20 打赏 收藏 转发到动态 举报
写回复
用AI写文章
20 条回复
切换为时间正序
请发表友善的回复…
发表回复
dean615 2017-03-29
  • 打赏
  • 举报
回复
或者说,这个时候要怎么查到是哪些资源被锁死?占用了?
dean615 2017-03-29
  • 打赏
  • 举报
回复
如查出现这种问题,有什么办法能不重启服务器,就能解决的嘛? 试过了重启IIS,重启asp.net state service都不行
  • 打赏
  • 举报
回复
看看你的数据有什么问题。 从稳定角度看,既然经常遇到这类问题,要么在编程设计异常小心(在你明确了数据问题之后),要么就不要使用 Session 集合,自己使用 Cache 和数据库已经足以处理数据了。
正怒月神 版主 2017-03-27
  • 打赏
  • 举报
回复
猜测不到。我也在想会不会是缓存问题?
丰云 2017-03-27
  • 打赏
  • 举报
回复
在报错时,看看内存使用是不是过大,也许是长时间大内存消耗,导致系统故障。
dean615 2017-03-27
  • 打赏
  • 举报
回复
日志里,也没到有拦截迹象~~
dean615 2017-03-27
  • 打赏
  • 举报
回复
引用 1 楼 foren_whb 的回复:
会不会是安全软件导致的? 你尝试在安全软件里把响应的端口和服务添加进白名单试试看
如果是这样,不是应该一开始就运行不成功?在线系统,运行挺久了~~
丰云 2017-03-27
  • 打赏
  • 举报
回复
会不会是安全软件导致的? 你尝试在安全软件里把响应的端口和服务添加进白名单试试看
lshfong 2017-03-27
  • 打赏
  • 举报
回复
估计是编码不严谨,有资源没释放,造成service崩溃了!你具体可以看下日志
dean615 2017-03-27
  • 打赏
  • 举报
回复
引用 16 楼 shingoscar 的回复:
开放这台机器的防火墙,让后让另一台机器连进这个state services,看看是否能正常保存 或者建个新的站点用个新的程序池来测试 看描述如果非要重启iis,应该是站点本身有程序错误了
不是要重启IIS,是必须重启服务器~~
Poopaye 2017-03-27
  • 打赏
  • 举报
回复
开放这台机器的防火墙,让后让另一台机器连进这个state services,看看是否能正常保存 或者建个新的站点用个新的程序池来测试 看描述如果非要重启iis,应该是站点本身有程序错误了
dean615 2017-03-27
  • 打赏
  • 举报
回复
引用 13 楼 diaodiaop 的回复:
[quote=引用 11 楼 cuthkid 的回复:] 还可以这样配置呀,你是在运行环境中这么使用的?是的话,我也来试试
很多年前 03的系统 后来就是2012了.. 跑了很多年的软件 至少没出现过 "丢失"或者你上面描述的问题..[/quote] 我也来试试~~
dean615 2017-03-27
  • 打赏
  • 举报
回复
引用 12 楼 Chinajiyong 的回复:
还是看看能不能找到其他日志错误 这下面链接说有可能和db server有关,你看看db server日志有没有错误 http://stackoverflow.com/questions/4160792/suddenly-getting-unable-to-make-the-session-state-request-to-the-session-state?rq=1
好的,我来看下~~
by_封爱 2017-03-27
  • 打赏
  • 举报
回复
引用 11 楼 cuthkid 的回复:
还可以这样配置呀,你是在运行环境中这么使用的?是的话,我也来试试
很多年前 03的系统 后来就是2012了.. 跑了很多年的软件 至少没出现过 "丢失"或者你上面描述的问题..
EnForGrass 2017-03-27
  • 打赏
  • 举报
回复
还是看看能不能找到其他日志错误 这下面链接说有可能和db server有关,你看看db server日志有没有错误 http://stackoverflow.com/questions/4160792/suddenly-getting-unable-to-make-the-session-state-request-to-the-session-state?rq=1
dean615 2017-03-27
  • 打赏
  • 举报
回复
引用 9 楼 diaodiaop 的回复:
我一般都是直接使用

<sessionState mode="StateServer" timeout="99999" stateNetworkTimeout="30" />
而没有所谓的端口这种东西..因为我不知道他们是干嘛的 所以一直也没用 也从来没遇到过任何问题... 不如LZ这样试试运行几天看看效果如何
还可以这样配置呀,你是在运行环境中这么使用的?是的话,我也来试试
dean615 2017-03-27
  • 打赏
  • 举报
回复
引用 7 楼 sp1234 的回复:
你的放入 Session集合的数据有没有什么过大或者过于诡异的对象?对象的属性有没有什么自定义的所谓“序列化、反序列化”方式(并且它在某些数据下、运行时有可能崩溃)?
这个要查一查了,原则上是不放大数据在SESSION里的
by_封爱 2017-03-27
  • 打赏
  • 举报
回复
我一般都是直接使用

<sessionState mode="StateServer" timeout="99999" stateNetworkTimeout="30" />
而没有所谓的端口这种东西..因为我不知道他们是干嘛的 所以一直也没用 也从来没遇到过任何问题... 不如LZ这样试试运行几天看看效果如何
  • 打赏
  • 举报
回复
日志里有没有State Server的错误日志?
  • 打赏
  • 举报
回复
你的放入 Session集合的数据有没有什么过大或者过于诡异的对象?对象的属性有没有什么自定义的所谓“序列化、反序列化”方式(并且它在某些数据下、运行时有可能崩溃)?
Scott Worley Publisher: New Riders Publishing First Edition November 15, 2001 ISBN: 0-7357-1135-6, 730 pages Inside ASP.NET Here’s what reviewers are saying about Inside ASP.NET: About the Author Contributing Authors About the Technical Reviewers Acknowledgments Tell Us What You Think! Introduction Who Is This Book For? Contents of the Book I: Introducing ASP.NET 1. An Overview of ASP.NET ASP.NET The .NET Base Class Libraries ASP.NET Web Application Configuration Session and State Management Cache Management ASP.NET Web Application Development Layers Web Forms XML Web Services COM/COM+ Interoperability and Component Services ADO.NET Migration from Classic ASP to ASP.NET Globalization and Localization Enhanced Security 2. Developing Applications with ASP.NET Application Settings Files The Page Syntax Commonly Used Objects and Classes in ASP.NET Tracing ASP.NET Applications ASP.NET Migration Issues Summary 3. Configuring ASP.NET Applications Deploying the web.config Configuration File Using the Configuration Section Analyzing the system.web Configuration Sections Summary II: Core ASP.NET 4. Web Form-Based Development Introduction to Web Forms Web Form Architecture Separating Code from the User Interface Server Controls Validation Controls Summary 5. State Management in ASP.NET What Is State Management? Using ASP.NET Application State Management Summary III: ASP.NET and Data Access 6. Using ADO.NET in ASP.NET Applications Data Access from a Web-Based Perspective ADO and ADO.NET Working with the Main ADO.NET Objects Building Data-Oriented Web Forms Transaction-Enabled ASP.NET Applications Summary 7. Using XML in ASP.NET Applications XML Document Structure How XML Is Used in ASP.NET Other XML Technologies Using XML in Your Application Real-World Examples Summary IV: Advanced Technologies 8. XML Web Service Development in ASP.NET Introduction to XML Web Services Using the SOAP Toolkit with XML Web Services XML Web Service Discovery—Advertising Your Service Using an XML Web Service in ASP.NET Pages Summary 9. Securing ASP.NET Applications Overview of ASP.NET Security Features Applying Security in ASP.NET Applications Inside ASP.NET Security Other Security Considerations Summary 10. Using Component Services with ASP.NET What Are Component Services? Applying Component Services in an ASP.NET Application The business Object Using the business Object Serviced Components Summary 11. Using Messaging Services with ASP.NET Introduction to Messaging Systems Managing MSMQ Message Queues with Windows 2000 Architecture of the .NET Messaging Services Accomplishing Tasks Using MSMQ and .NET Summary 12. Using Directory Services with ASP.NET Introducing Directory Services How Does Active Directory Work? The Benefits of Active Directory Active Directory Technology Summary Summary 13. Localizing and Globalizing ASP.NET Applications What Is Localization? Localizing an ASP.NET Web Application Summary V: Advanced Web Forms 14. Cache Control in ASP.NET ASP.NET Cache Management Page Output Caching Fragment Caching (Partial Page Caching) Request Caching Summary 15. Creating User and Custom Controls for ASP.NET User Controls Introduction to Custom Controls Summary 16. Mobile Device Development with ASP.NET Wireless Application Protocol (WAP) Wireless Markup Language (WML) Enter ASP.NET Summary VI: Putting It All Together 17. Putting It All Together What Is ProjectPal? Installing the ProjectPal Application A Brief Application Walkthrough Application Architecture ProjectPal Service Layers ProjectPal Client Interfaces The ProjectPal Database The ProjectPal Components Inside the ProjectPal Code Summary VII: Appendixes A. An Overview of .NET Multiple Development Platforms Multiple Development Languages .NET Base Class Libraries Common Language Runtime (CLR) Common Type System (CTS) .NET Server Products B. ASP.NET Common Object Reference HttpContext Object (Context Intrinsic Control) The HttpApplication Class The HttpApplicationState Class (Application Intrinsic Object) The HttpSessionState Class ( Session Intrinsic Object) The HttpRequest Class (Request Intrinsic Object) The HttpResponse Class (Response Intrinsic Object) The Server Class ( HttpServerUtility ) SMTPMail API C. ADO Common Object Reference DataSet Object DataTable Object DataColumn Object DataRow Class DataRelation Object DataView Object DataRowView Class OLEDBDATA Objects SQLData … Objects D. HTML Server Control Reference HtmlForm Object— < form> Element HtmlInputText Object— < input> Element HtmlInputHidden Object— < input type=“hidden”> Element HtmlInputCheckbox Object— < input type=”checkbox”> Element HtmlInputRadioButton Object— < input type=“radiobutton”> Element HtmlInputFile Object— < input type=“file”> Element HtmlTextArea Object— < textarea> Element HtmlButton Object— < button> Element HtmlInputButton Object— < input type=“button”> Element HtmlAnchor Object— < a> Element HtmlImage Object— < img> Element HtmlInputImage Object— < input type=“image”> Element HtmlSelect Object— < select> and

62,041

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧