gexiaonie commented on issue #2313:
URL: https://github.com/apache/brpc/issues/2313#issuecomment-1632225108

   > 
   
   你的场景大概是: 
本身是一个brpc服务,然后调用tf的,而tf里面有部分op是请求下游的rpc服务?这个场景的核心问题就是DirectSession::Run会使用pthread同步机制,阻塞当前的pthread。导致bthread的worker线程被卡住,bthread无法切换走。qps一高,就有可能导致bthread的线程池全部被占用,整个brpc服务卡住。感觉可以这样解决:
 新建一个pthread线程池,将session::run丢到这个新建的线程池处理(当然使用异步的方式)。这样就不会导致bthread 
worker线程卡死的问题了。


-- 
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