weibocom / motan

A cross-language remote procedure call(RPC) framework for rapid development of high performance distributed services.
Other
5.88k stars 1.78k forks source link

长时间不请求就出现getChannel Error #1023

Open zfvipgit opened 1 year ago

zfvipgit commented 1 year ago

com.weibo.api.motan.exception.MotanServiceException: error_message: NettyClient getChannel Error: url=motan://xx.xx.xx.xx:7763/com.xtr.sprit.merchant.api.service.workflow.ApprovalProcessService, status: 503, error_code: 10001,r=null

rayzhang0603 commented 1 year ago

可以看看有没有链接异常相关的error日志,比如Connection reset或者 Connect reset by peer之类的异常。motan是通过tcp的keepalive机制来保持链接有效的,如果是链接失效导致的异常,可以设置系统的tcp keepalive相关参数来调整tcp的探活频次,尽快感知到tcp链接失效的情况

LaoZhang-best commented 1 year ago

一样的情况,长时间不请求会抛出该异常。目前采用的暴露方式是通过k8s的service访问,服务端包括客户端均无异常,在重复请求多次后又恢复正常。