Re: [I] 长期未访问,再次访问抛出E112 Not Connectted错误 (brpc)

2023-10-06 Thread via GitHub


Huixxi closed issue #2384: 长期未访问,再次访问抛出E112 Not Connectted错误
URL: https://github.com/apache/brpc/issues/2384


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: [I] 长期未访问,再次访问抛出E112 Not Connectted错误 (brpc)

2023-09-19 Thread via GitHub


chenBright commented on issue #2384:
URL: https://github.com/apache/brpc/issues/2384#issuecomment-1726806287

   SingleServer场景下,只要到server的Socket Failed了且没恢复,就会出现112了
   
https://github.com/apache/brpc/blob/0ef35f3498dbfbdef3d8dcda62e815c1b1e06d37/src/brpc/controller.cpp#L1045-L1055
   
   而POOLED下,连续n次连接超时,会将main Socket SetFailed
   
https://github.com/apache/brpc/blob/0ef35f3498dbfbdef3d8dcda62e815c1b1e06d37/src/brpc/socket.cpp#L1469-L1480
   
   
https://github.com/apache/brpc/blob/0ef35f3498dbfbdef3d8dcda62e815c1b1e06d37/src/brpc/controller.cpp#L737-L745


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: [I] 长期未访问,再次访问抛出E112 Not Connectted错误 (brpc)

2023-09-19 Thread via GitHub


WonderLiu96 commented on issue #2384:
URL: https://github.com/apache/brpc/issues/2384#issuecomment-1725246711

   > 
使用CONNECTION_TYPE_POOLED的话,空闲关闭后,会直接丢掉这个连接。下一次rpc时,池会新建连接的,所以不会出现关闭空闲连接导致112的问题的。
   
   好的,谢谢大佬解答,我们评估一下。


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: [I] 长期未访问,再次访问抛出E112 Not Connectted错误 (brpc)

2023-09-19 Thread via GitHub


chenBright commented on issue #2384:
URL: https://github.com/apache/brpc/issues/2384#issuecomment-1725220880

   使用CONNECTION_TYPE_POOLED的话,空闲关闭后,会直接丢掉这个连接,下一次就会新建连接的,不会出现关闭空闲连接导致112的问题的。


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: [I] 长期未访问,再次访问抛出E112 Not Connectted错误 (brpc)

2023-09-19 Thread via GitHub


WonderLiu96 commented on issue #2384:
URL: https://github.com/apache/brpc/issues/2384#issuecomment-1725185436

   > 空闲关闭的,还需要感知和重试吗?
   
   
可能我没有表达清楚,我意思是client通过缓存的channel和server通信,但是在一次通信之后,长时间未通信,连接被server关闭。关闭后,client再发送请求,就会得到E112。而这个错误只需要等HealthCheck之后重试就行了,我们的需求是在我们这一层是要作为SDK给用户使用,所以这种错误我们想能够精确知道,然后内部直接重试吞掉。但E112看文档有很多原因可能导致,因此我们想能不能有其他精确的定位这个错误的方式。


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: [I] 长期未访问,再次访问抛出E112 Not Connectted错误 (brpc)

2023-09-19 Thread via GitHub


chenBright commented on issue #2384:
URL: https://github.com/apache/brpc/issues/2384#issuecomment-1725161067

   空闲关闭的,还需要感知吗?


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: [I] 长期未访问,再次访问抛出E112 Not Connectted错误 (brpc)

2023-09-19 Thread via GitHub


WonderLiu96 commented on issue #2384:
URL: https://github.com/apache/brpc/issues/2384#issuecomment-1725159831

   > 池里的连接是不会进行HealthCheck的,所以不会出现关闭空闲连接导致112的问题的。
   
   那链接关闭了,我可以通过什么感知?因为当我访问server时,若关闭了,我需要内部重试


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: [I] 长期未访问,再次访问抛出E112 Not Connectted错误 (brpc)

2023-09-19 Thread via GitHub


chenBright commented on issue #2384:
URL: https://github.com/apache/brpc/issues/2384#issuecomment-1725016097

   池里的连接是不会进行HealthCheck,所以不会出现关闭空闲连接导致112的问题的。


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: [I] 长期未访问,再次访问抛出E112 Not Connectted错误 (brpc)

2023-09-19 Thread via GitHub


WonderLiu96 commented on issue #2384:
URL: https://github.com/apache/brpc/issues/2384#issuecomment-1725015452

   > > server断开连接,client需要经过HealthCheck才能恢复对这个server的正常访问。
   > 
   > 嗯,这个我看了是在`SetFailed()`里面启动的,那目前brpc是没有其他的类似保活的机制吗?
   
   其实我们场景的需求就是想着把这种错误在我们程序内部给消化掉,不暴露给用户,要是能有一个特定的错误码能够唯一标识这种情况就好了


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: [I] 长期未访问,再次访问抛出E112 Not Connectted错误 (brpc)

2023-09-19 Thread via GitHub


WonderLiu96 commented on issue #2384:
URL: https://github.com/apache/brpc/issues/2384#issuecomment-1725012440

   > 改用CONNECTION_TYPE_POOLED应该可以避免这个问题
   
   使用连接池的话,我看文档的描述
   ```
   
当连接池中的某个连接在-idle_timeout_second时间内没有读写,则被视作“闲置”,会被自动关闭。默认值为10秒。此功能只对连接池(pooled)有效。打开-log_idle_connection_close在关闭前会打印一条日志。
   ```
   仍然是会有个"闲置"的关闭时间,我们的场景有很多客户端,有一些访问很惰性,感觉这个还是没法满足。


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: [I] 长期未访问,再次访问抛出E112 Not Connectted错误 (brpc)

2023-09-19 Thread via GitHub


WonderLiu96 commented on issue #2384:
URL: https://github.com/apache/brpc/issues/2384#issuecomment-1725007783

   > server断开连接,client需要经过HealthCheck才能恢复对这个server的正常访问。
   
   嗯,这个我看了是在`SetFailed()`里面启动的,那目前brpc是没有其他的类似保活的机制吗?
   


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: [I] 长期未访问,再次访问抛出E112 Not Connectted错误 (brpc)

2023-09-19 Thread via GitHub


chenBright commented on issue #2384:
URL: https://github.com/apache/brpc/issues/2384#issuecomment-1724917122

   改用CONNECTION_TYPE_POOLED应该可以避免这个问题


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: [I] 长期未访问,再次访问抛出E112 Not Connectted错误 (brpc)

2023-09-19 Thread via GitHub


chenBright commented on issue #2384:
URL: https://github.com/apache/brpc/issues/2384#issuecomment-1724916590

   server断开连接,client需要经过HealthCheck才能恢复对这个server的正常访问。


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: [I] 长期未访问,再次访问抛出E112 Not Connectted错误 (brpc)

2023-09-18 Thread via GitHub


WonderLiu96 commented on issue #2384:
URL: https://github.com/apache/brpc/issues/2384#issuecomment-1724780066

   > 使用ip:port还是名字访问server?
   
   是用ip:port访问的server,在client中还用缓存了channel。


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org



Re: [I] 长期未访问,再次访问抛出E112 Not Connectted错误 (brpc)

2023-09-18 Thread via GitHub


chenBright commented on issue #2384:
URL: https://github.com/apache/brpc/issues/2384#issuecomment-1724722406

   使用ip:port还是名字访问server?


-- 
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: dev-unsubscr...@brpc.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org