A, problem,

Exception information encountered in the test environment is as follows:

16-10-17 00:00:00.033 [New I/O Server worker #1-6] WARN Com.alibaba.dubbo.com mon. 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: . 17 00:00:00 127.0.0.116-10-033 [New I/O server worker # 1-6] WARN org.jboss.net ty. Channel. DefaultChannelPipeline – [DUBBO] An exception was thrown by a user handler while handling an exception event ([id: 0 x3c650867, / 10.0.0.83:53184 = > / 10.0.0.77:20703] the 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]

Ii. Problem analysis

Actual configuration of the project:

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

Threadpool = “fixed” : The thread model is a pool of a fixed size, threads are created at startup, threads are not closed, threads are always held = “500” : Accepts = “1000” : limits the maximum number of connections accepted by the server to 1000

Take a look at the thread model on dubbo’s website


  • Dispatcher

    • All All messages are sent to the thread pool, including requests, responses, connection events, disconnection events, and heartbeats.

    • Direct Messages are not sent to the thread pool and are executed directly on the I/O thread.

    • Message Only request response messages are sent to the thread pool. Other connection disconnection events, heartbeats, and other messages are executed directly on the I/O thread.

    • Execution only requests messages to be sent to the thread pool, and does not contain responses, responses, and other disconnected events. Execution is performed directly on the IO thread.

    • Connection On an I/O thread, disconnection events are queued, executed one by one, and other messages are dispatched to the thread pool.

  • ThreadPool

    • Fixed Fixed size thread pool, created when started, not closed, always held. (the default)

    • Cached thread pool, automatically deleted after one minute idle and rebuilt as needed.

    • A limited can scale a thread pool, but the number of threads in the pool only grows, not shrinks. (To avoid performance problems caused by sudden high flow when shrinking).

Configuration such as:

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

Configure the tag

<dubbo:provider/>

<dubbo:protocol/>

Ex. :

<dubbo:protocol/>

https://github.com/HadesJK/dubbo-demo