码迷,mamicode.com
首页 > 其他好文 > 详细

异常--Interrupting idle Thread

时间:2015-02-12 16:16:47      阅读:314      评论:0      收藏:0      [点我收藏+]

标签:glassfish

今天遇到系统无法访问问题,检查日志异常如下。


异常信息

|WARNING|glassfish3.1.2|com.sun.grizzly.config.GrizzlyServiceListener|_ThreadID=14;_ThreadName=Thread-2;|GRIZZLY0023: Interrupting idle Thread: http-thread-pool-28080(4).|#]


根据字面意思理解(Interrupting idle Thread)中断空闲的线程。网上摘取一段资料,https://www.java.net/node/703110

the interrupted message/warning itself is not a bug, it is just an indicator that HTTP request processing (Servlet execution) takes longer than expected (expectation is set by request-timeout setting). You can always disable this feature by setting request-timeout to -1 on an appropriate http-listener like [1]. The default timeout value is set to 15mins, it means one single servlet execution takes longer than 15mins! If this is ok - then just disable the timeout [1], if this is not ok - then there should be something wrong w/ the servlet/webapplication code.

大体意思是,一个servlet请求默认超时为15分钟,如果在高并发情况下,线程很多就会导致线程的堵塞,当达到线程开启上线的时候导致新线程无法开启。


嗯,有点意思了,根据这个资料,我对我的服务做了先调整,我用的是glassfish,调整了超时时间为5分钟,并且增加了最大线程数,如图,

技术分享


再运行一段时间,看看还会不会再出现这个警告了。


个人分析,在高并发情况下,每个请求都相应缓慢,而且超时时间为15分钟较长,随着时间增加,服务线程数达到峰值,导致出现此类问题。


异常--Interrupting idle Thread

标签:glassfish

原文地址:http://blog.csdn.net/gaopeng0071/article/details/43760845

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!