异常--Interrupting idle Thread

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


异常信息

|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分钟较长,随着时间增加,服务线程数达到峰值,导致出现此类问题。


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值