liubao68 commented on issue #1943:
URL: 
https://github.com/apache/servicecomb-java-chassis/issues/1943#issuecomment-688834940


   错误日志没有包含详细的错误原因, 不知道具体情况。 但是你的用法是错误的。 edge service默认是工作在 reacitve 模式, 即 
Handler 的执行都是在 event-loop 线程。 这意味着不能执行任何阻塞操作。包括你写的 restTemplate.getForObject 
就属于阻塞操作。 在 reactive 模式,使用阻塞操作容易导致超时、死锁等情况。 
   
   Hanlder调用其他服务, 需要使用异步非阻塞的方式处理。 参考示例代码:
   
   
https://github.com/apache/servicecomb-fence/blob/master/api/edge-service/endpoint/src/main/java/org/apache/servicecomb/authentication/edge/AuthHandler.java


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

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


Reply via email to