startjava commented on issue #8826:
URL: https://github.com/apache/dubbo/issues/8826#issuecomment-920946765


   当我加大提供者的sleep时间时:
   package com.ghy.www.my.loadbalance.provider.service;
   
   import com.ghy.www.api.IService3;
   import org.springframework.beans.factory.annotation.Value;
   
   public class HelloService3 implements IService3 {
       @Value("${server.port}")
       private int portValue;
   
       @Override
       public String getHello(String username) {
           System.out.println("HelloService3 portValue=" + portValue + " 
username=" + username);
           if (portValue == 8085) {
               try {
                   Thread.sleep(800);
               } catch (InterruptedException e) {
                   e.printStackTrace();
               }
           }
           if (portValue == 8086) {
               try {
                   Thread.sleep(700);
               } catch (InterruptedException e) {
                   e.printStackTrace();
               }
           }
           if (portValue == 8087) {
               try {
                   Thread.sleep(10);
               } catch (InterruptedException e) {
                   e.printStackTrace();
               }
           }
           return "hello3 " + username + " port=" + portValue;
       }
   }
   
   执行消费者后,提供者出现警告:
   Thread pool is EXHAUSTED! Thread Name: 
DubboServerHandler-192.168.30.188:20882, Pool Size: 200 (active: 200, core: 
200, max: 200, largest: 200), Task: 991 (completed: 791), Executor 
status:(isShutdown:false, isTerminated:false, isTerminating:false), in 
dubbo://192.168.30.188:20882!, dubbo version: 3.0.3-SNAPSHOT, current host: 
192.168.191.1
   
   这个实验不管我如何测,都测不出理想中的效果(由于8085最慢,所以请求到8085的请求是“超级”少的)。


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to