Problem: the beginning of project operation is no problem, but after a period of time, netty end can't subscribe to news from the websocket,
Online:
(1) the config set client - the output buffer - limit pubsub 0 0 0, this setting will not limit the size of the cache news, but I don't think this is reasonable, the official don't recommend this solution, https://blog.csdn.net/luyaoying001/article/details/80264347
(2)
https://tcspecial.iteye.com/blog/2316033My phenomenon and this article is very similar, but he finally give the solution, I don't know what is the principle?
The friend encountered similar problems, help to provide the train of thought, thank you very much
CodePudding user response:
I also met, can't, only through the timer calls every 30 seconds. Redis convertAndSend method can ensure continuous line, feels more sbCodePudding user response:
TCP keepalive - the impact of this configuration, the configuration of the default is 0 official suggested value of 60 units are seconds,This configuration is used to check the health of the connection time, can be understood as a heartbeat
If set to 0 will not check the heart information, can cause the connection has been disconnected actually, but the client don't know, also won't throw exceptions, where also silly blpop,
The TCP keepalive - 60 can solve this problem