这两天dubbo出现突然挂掉的现象。异常如下:

[DUBBO] Thread pool is EXHAUSTED! Thread Name: DubboServerHandler-192.168.2.187:20880, Pool Size: 200 (active: 200, core: 200, max: 200, largest: 200), Task: 6294 (completed: 6094), Executor status:(isShutdown:false, isTerminated:false, isTerminating:false), in dubbo://192.168.2.187:20880!, dubbo version: 2.5.3, current host: 192.168.2.187

然后使用jstack ‘pid’>xxx.log查看日志:

DubboServerHandler-192.168.2.187:20880-thread-192" #232 daemon prio=5 os_prio=0 tid=0x00007fe844056000 nid=0x12e3 waiting for monitor entry [0x00007fe825958000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at org.springframework.jms.connection.SingleConnectionFactory.getConnection(SingleConnectionFactory.java:281)
- waiting to lock <0x00000000fd9b9bc0> (a java.lang.Object)
at org.springframework.jms.connection.SingleConnectionFactory.createConnection(SingleConnectionFactory.java:224)
at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:180)
at org.springframework.jms.core.JmsTemplate.access$600(JmsTemplate.java:90)
at org.springframework.jms.core.JmsTemplate$JmsTemplateResourceFactory.createConnection(JmsTemplate.java:1177)
at org.springframework.jms.connection.ConnectionFactoryUtils.doGetTransactionalSession(ConnectionFactoryUtils.java:312)
at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:471)
at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:559)
at com.hginfo.hbm.be.service.impl.nb.jms.NbJmsServiceImpl.sendPerformanceMessage(NbJmsServiceImpl.java:73)
at com.hginfo.hbm.be.service.impl.nb.jms.NbJmsServiceImpl.sendMessage(NbJmsServiceImpl.java:56)
at com.hginfo.hbm.be.service.impl.nb.jms.NbJmsServiceImpl$$FastClassBySpringCGLIB$$78ff2af8.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:720)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:52)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:168)
at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:280)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at com.alibaba.druid.support.spring.stat.DruidStatInterceptor.invoke(DruidStatInterceptor.java:72)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:655)
at com.hginfo.hbm.be.service.impl.nb.jms.NbJmsServiceImpl$$EnhancerBySpringCGLIB$$869e41d8.sendMessage(<generated>)
at com.hginfo.hbm.be.service.impl.nb.NbMQServiceImpl.doDcCommonReport(NbMQServiceImpl.java:479)
at com.hginfo.hbm.be.service.impl.nb.NbMQServiceImpl.saveDeviceReport(NbMQServiceImpl.java:79)
at com.hginfo.hbm.be.service.impl.nb.NbMQServiceImpl$$FastClassBySpringCGLIB$$98ff479c.invoke(<generated>)

at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)

重点:java.lang.Thread.State: BLOCKED (on object monitor)

dubbo的线程被activemq连接的线程所阻塞。

发现问题出在activemq上,amq作为轻量级中间件,cpu很少耗尽,推测为amq配置问题,增加内存:set ACTIVEMQ_OPTS=-Xms1G-Xmx1G。

问题解决,bubbo不再挂掉。

dubbo线程池中无可用线程相关推荐

  1. C#如何判断线程池中所有的线程是否已经完成(转)

    其 实很简单用ThreadPool.RegisterWaitForSingleObject方法注册一个定时检查线程池的方法,在检查线程的方法内调用 ThreadPool.GetAvailableThr ...

  2. [.Net线程处理系列]专题二:线程池中的工作者线程

    目录: 一.上节补充 二.CLR线程池基础 三.通过线程池的工作者线程实现异步 四.使用委托实现异步 五.任务 六.小结 一.上节补充 对于Thread类还有几个常用方法需要说明的. 1.1 Susp ...

  3. [C#]获得线程池中活动的线程数

    在C#中的线程池ThreadPool没有获得线程池中的活动线程数量的属性或者是方法,但是有一两个 方法可以帮助获得活动线程数. 这两个方法分别是:GetMaxThreads和GetAvailableT ...

  4. Java线程池线程突然没了_70%人答不全!线程池中的一个线程异常了会被怎么处理?...

    #线程池中的一个线程异常了会被怎么处理? 估计很多人会是以下三点答案(me too): 1.抛异常出来并打印在控制台上 2.其他线程任务不受影响 3.异常线程会被回收 但是这里我先提前说一下以上三点不 ...

  5. 线程池中运行的线程,当等待队列未满的情况下,一定不大于核心线程数吗

    通过<线程池内运行的线程抛异常,线程池会怎么办>了解到当线程执行的任务出现异常时,会将当前线程移出线程池,并新增一个线程到线程池中,我们先来回顾一下线程池的运行原理: 从原理图中可以看到只 ...

  6. 突然就懵了!面试官问我:线程池中多余的线程是如何回收的?

    点击关注公众号,Java干货及时送达 最近阅读了JDK线程池ThreadPoolExecutor的源码,对线程池执行任务的流程有了大体了解,实际上这个流程也十分通俗易懂,就不再赘述了,别人写的比我好多 ...

  7. mysql 线程池大小设置_MySQL线程池参数解析

    线程池是数据库系统非常重要功能,然而MySQL社区版并不包含线程池功能,不过好在MySQL的Percona发行版本提供了这个功能,除此之外,MySQL的企业版也提供线程池,从性价比上说,Percona ...

  8. 《C#多线程编程实战(原书第2版)》——3.2 在线程池中调用委托

    本节书摘来自华章出版社<C#多线程编程实战(原书第2版)>一书中的第3章,第3.2节,作者(美)易格恩·阿格佛温(Eugene Agafonov),黄博文 黄辉兰 译,更多章节内容可以访问 ...

  9. Java并发编程之线程池中的Future

    线程池中的Future: 线程池的典型使用场景 ExecutorService executorService = Executors.newFixedThreadPool(10);//此处Task为 ...

  10. python 判断线程是否执行完毕_判断线程池中的线程是否全部执行完毕

    在使用多线程的时候有时候我们会使用 java.util.concurrent.Executors的线程池,当多个线程异步执行的时候,我们往往不好判断是否线程池中所有的子线程都已经执行完毕,但有时候这种 ...

最新文章

  1. hadoopStreaming---使用Python编写MapReduce
  2. 自学python需要安装什么软件-零基础入门Python怎么学习?老男孩python用什么软件...
  3. Proteus仿真STM32F103R6微控制器的GPIO(按键控制LED开关)
  4. Java Web - Struts2基本执行流程
  5. 自学Java必看的知识点,猿们怎么看?
  6. php返回支付状态,magento paypal返回支付状态
  7. c4d计算机丢失api-ms,SVsSccManager Interface
  8. ubuntu 20.04 DNS 设置
  9. 解决fegin post requestbody 400报错问题
  10. git push 遇到的rejected问题
  11. hive和presto处理月末月初
  12. word表格复制到excel回车换行问题 1
  13. Windows 10进入安全模式密码错误如何解决?
  14. 【JS代码提高--003】:JavaScript 生成间于最小值和最大值之间的随机数
  15. mac夜神模拟器与mac数据共享设置
  16. Nginx 反向代理https
  17. 计算字符串长度.length()和数组长度.length的区别
  18. Unable to locate tools.jar. Expected to find it in........
  19. 无胁科技-TVD每日漏洞情报-2022-7-20
  20. 吉他 手小琴大解决方法

热门文章

  1. 中国电信运营商布局云计算“赛道”面临三大挑战
  2. python代码如何转java_将简单的Python代码转换为Java方法
  3. 纸壳cms php,纸壳CMS 3.4 发布,电商功能增强
  4. python飞机大战源码以及素材资源
  5. html表格之个人简历
  6. 单片机c语言 开方函数,单片机C语言求平方根函数
  7. php操作redis实例大全
  8. 计算机网络技术论文致谢,路由器论文致谢
  9. 黑马程序员pink老师_CSS学习笔记
  10. AWVS12 安装教程(详细附图)