一、问题

在测试环境遇到的异常信息,如下:

16-10-17 00:00:00.033 [New I/O server worker #1-6] WARN  com.alibaba.dubbo.common.threadpool.support.AbortPolicyWithReport -  [DUBBO] Thread pool is EXHAUSTED! Thread Name: DubboServerHandler-10.0.0.77:20703, Pool Size: 500 (active: 500, core: 500, max: 500, largest: 500), Task: 5897697 (completed: 5897197), Executor status:(isShutdown:false, isTerminated:false, isTerminating:false), in dubbo://10.0.0.77:20703!, dubbo version: 2.5.3, current host: 127.0.0.1

16-10-17 00:00:00.033 [New I/O server worker #1-6] WARN  org.jboss.netty.channel.DefaultChannelPipeline -  [DUBBO] An exception was thrown by a user handler while handling an exception event ([id: 0x3c650867, /10.0.0.83:53184 => /10.0.0.77:20703] EXCEPTION: com.alibaba.dubbo.remoting.ExecutionException: class com.alibaba.dubbo.remoting.transport.dispatcher.all.AllChannelHandler error when process received event .), dubbo version: 2.5.3, current host: 127.0.0.1
com.alibaba.dubbo.remoting.ExecutionException: class com.alibaba.dubbo.remoting.transport.dispatcher.all.AllChannelHandler error when process caught event .
        at com.alibaba.dubbo.remoting.transport.dispatcher.all.AllChannelHandler.caught(AllChannelHandler.java:67) ~[dubbo-2.5.3.jar:2.5.3]

p

二、问题分析

项目的实际配置:

<dubbo:provider timeout="50000" threadpool="fixed" threads="500" accepts="1000" />

timeout="5000":设置远程调用服务的超时时间为5000毫秒
threadpool="fixed":线程模型为固定大小的线程池,启动时建立线程,不关闭,一直持有
threads="500":线程数为500
accepts="1000":限制服务器端的接受的连接的最大值为1000

再看看dubbo官网上的线程模型的内容

  • Dispatcher
    • all 所有消息都派发到线程池,包括请求,响应,连接事件,断开事件,心跳等。
    • direct 所有消息都不派发到线程池,全部在IO线程上直接执行。
    • message 只有请求响应消息派发到线程池,其它连接断开事件,心跳等消息,直接在IO线程上执行。
    • execution 只请求消息派发到线程池,不含响应,响应和其它连接断开事件,心跳等消息,直接在IO线程上执行。
    • connection 在IO线程上,将连接断开事件放入队列,有序逐个执行,其它消息派发到线程池。
  • ThreadPool
    • fixed 固定大小线程池,启动时建立线程,不关闭,一直持有。(缺省)
    • cached 缓存线程池,空闲一分钟自动删除,需要时重建。
    • limited 可伸缩线程池,但池中的线程数只会增长不会收缩。(为避免收缩时突然来了大流量引起的性能问题)。

配置如:

<dubbo:protocolname="dubbo"dispatcher="all"threadpool="fixed"threads="100"/>

配置标签

<dubbo:provider/>

<dubbo:protocol/>

例:

<!-- 当ProtocolConfig和ServiceConfig某属性没有配置时,采用此缺省值 -->
<dubbo:provider timeout="10000" threadpool="fixed" threads="100" accepts="1000" />

<dubbo:protocol/>

DUBBO Thread pool is EXHAUSTED!的更多相关文章

  1. [Done][DUBBO] dubbo Thread pool is EXHAUSTED!

    异常信息: com.alibaba.dubbo.remoting.ExecutionException: class com.alibaba.dubbo.remoting.transport.disp ...

  2. Caused by: java.util.concurrent.RejectedExecutionException: Thread pool is EXHAUSTED! Thread Name:

    异常引发的问题: 线程模型 如果事件处理的逻辑能迅速完成,并且不会发起新的 IO 请求,⽐如只是在内存中记个标识,则直接在 IO 线程上处理更快,因为减少了线程池调度. 但如果事件处理逻辑较慢,或者需 ...

  3. Reporting Service 告警"w WARN: Thread pool pressure. Using current thread for a work item"

    如果Reporting Service偶尔出现不可访问或访问出错情况,这种情况一般没有做监控的话,很难捕捉到.出现这种问题,最好检查Reporting Service的日志文件. 今天早上就遇到这样一 ...

  4. The CLR's Thread Pool

    We were unable to locate this content in zh-cn. Here is the same content in en-us. .NET The CLR's Th ...

  5. MySQL thread pool【转】

    本文来自:http://blog.chinaunix.net/uid-26896862-id-3993773.html 刚刚经历了淘宝的双11,真实感受到了紧张的氛围.尽管DB淡定的度过,但是历程中的 ...

  6. worksteal thread pool

    worksteal的场景 对于一个线程池,每个线程有一个队列,想象这种场景,有的线程队列中有大量的比较耗时的任务堆积,而有的线程队列却是空的,现象就是有的线程处于饥饿状态,而有的线程处于消化不良的状态 ...

  7. Improve Scalability With New Thread Pool APIs

    Pooled Threads Improve Scalability With New Thread Pool APIs Robert Saccone Portions of this article ...

  8. CLR thread pool

    Thread Pooling https://msdn.microsoft.com/en-us/library/windows/desktop/ms686756(v=vs.85).aspx Threa ...

  9. MySQL Thread Pool: Problem Definition

    A new thread pool plugin is now a part of the MySQL Enterprise Edition.In this blog we will cover th ...

随机推荐

  1. Java环境变量配置&解决版本不一致问题

    之前用Myeclipse编译运行Java没有问题 但是突然想用简单点的NotePad++以及cmd直接编译运行Java 这就让我倒腾了一晚上 先说下问题的解决,再总结下查阅的一些知识. 1.进行win ...

  2. Git关联远程GitHub仓库

    一.本地安装GIT版本控制软件 二.配置Git,设置用户信息 git config --global user.name "jack" git config --global us ...

  3. angular 控制器之间值得传递

    <div ng-controller="ParentCtrl"> <!--父级--> <div ng-controller="SelfCtr ...

  4. 帝国cms 灵动标签调用顶级栏目导航

    [e:loop={"select classname,classpath from [!db.pre!]enewsclass where bclassid=0 order by classi ...

  5. MAC 使用Jetbrains's产品

    Jetbrains's MAC 使用 ./gradle fatjar 或者 ./gradlew.sh fatjar java -jar build/lib/xx.jar 链接: http://pan. ...

  6. 各浏览器Cookie大小、个数限制

    一.浏览器允许每个域名所包含的cookie数: Microsoft指出InternetExplorer8增加cookie限制为每个域名50个,但IE7似乎也允许每个域名50个cookie. Firef ...

  7. HTML和CSS特殊属性

    禁止用户选中html元素: <body onselectstart="return false"> 禁止事件传递: favorite.find("span&q ...

  8. c# 函数练习;结构体、枚举类型

       * 结构体 1.就是一个自定义的集合,里面可以放各种类型的元素,用法大体跟集合一样. 注意:枚举类型和结构体都属于值类型. 2.定义的方法: struct student { public in ...

  9. Spring Batch系列总括(转载)

    最近一个项目在使用SpringBatch框架做一个电子商务平台的批处理.网上资料很有限,尤其是中文资料更是少之又少,官网上的文档也只是讲一些入门的基础知识,大部分高级特性都是一笔带过,讲解的很不彻底, ...

  10. 14.6.7 Configuring the Number of Background InnoDB IO Threads 配置InnoDB IO Threads的数量

    14.6.7 Configuring the Number of Background InnoDB IO Threads 配置InnoDB IO Threads的数量 InnoDB 使用后台线程来服 ...