Spring-Redis-Cache:如果我们在天蓝色的情况下重新启动redis,需要花费一些时间重新连接

问题描述

我们正在使用带有2.3.1-Spring发行版的Spring Boot的Lettuce静态Redis。当我们在Azure上部署应用程序并连接到Azure上的Redis缓存时,我们看到一个奇怪的问题。如果我们重新连接需要15分钟以上重新启动我们的redis应用程序。但是,当我们在本地运行同一应用程序时,从本地连接到azure redis实例时,重新启动时只需不到5分钟即可重新连接。

我们是否需要更改azure或springboot应用程序上的任何配置以在连接可用后立即强制重新连接。以下是我们的日志。

19-10-2020 15:57:33.994 DEBUG r.n.http.server.HttpServerOperations  [id: 0x6ef9d608,L:/10.0.0.111:8080 - R:/10.0.0.6:54100] Increasing pending responses,now 1 
19-10-2020 15:57:33.994 DEBUG reactor.netty.http.server.HttpServer  [id: 0x6ef9d608,L:/10.0.0.111:8080 - R:/10.0.0.6:54100] Handler is being applied: org.springframework.http.server.reactive.ReactorHttpHandlerAdapter@47bcb563 
19-10-2020 15:57:33.999 DEBUG r.n.http.server.HttpServerOperations  [id: 0x6ef9d608,L:/10.0.0.111:8080 - R:/10.0.0.6:54100] Detected non persistent http connection,preparing to close 
19-10-2020 15:57:34.000 DEBUG r.n.http.server.HttpServerOperations  [id: 0x6ef9d608,L:/10.0.0.111:8080 - R:/10.0.0.6:54100] Last HTTP response frame 
19-10-2020 15:57:34.000 DEBUG r.n.http.server.HttpServerOperations  [id: 0x6ef9d608,L:/10.0.0.111:8080 - R:/10.0.0.6:54100] Last HTTP packet was sent,terminating the channel 
19-10-2020 15:58:03.994 DEBUG r.n.http.server.HttpServerOperations  [id: 0xbfe5c284,L:/10.0.0.111:8080 - R:/10.0.0.6:54626] New http connection,requesting read 
19-10-2020 15:58:03.994 DEBUG r.netty.channel.BootstrapHandlers  [id: 0xbfe5c284,L:/10.0.0.111:8080 - R:/10.0.0.6:54626] Initialized pipeline DefaultChannelPipeline{(BootstrapHandlers$BootstrapInitializerHandler#0 = reactor.netty.channel.BootstrapHandlers$BootstrapInitializerHandler),(reactor.left.httpCodec = io.netty.handler.codec.http.HttpServerCodec),(reactor.left.httpTrafficHandler = reactor.netty.http.server.HttpTrafficHandler),(reactor.right.reactiveBridge = reactor.netty.channel.ChannelOperationsHandler)} 
19-10-2020 15:58:03.994 DEBUG r.n.http.server.HttpServerOperations  [id: 0xbfe5c284,L:/10.0.0.111:8080 - R:/10.0.0.6:54626] Increasing pending responses,now 1 
19-10-2020 15:58:03.995 DEBUG reactor.netty.http.server.HttpServer  [id: 0xbfe5c284,L:/10.0.0.111:8080 - R:/10.0.0.6:54626] Handler is being applied: org.springframework.http.server.reactive.ReactorHttpHandlerAdapter@47bcb563 
19-10-2020 15:58:04.003 DEBUG r.n.http.server.HttpServerOperations  [id: 0xbfe5c284,L:/10.0.0.111:8080 - R:/10.0.0.6:54626] Detected non persistent http connection,preparing to close 
19-10-2020 15:58:04.004 DEBUG r.n.http.server.HttpServerOperations  [id: 0xbfe5c284,L:/10.0.0.111:8080 - R:/10.0.0.6:54626] Last HTTP response frame

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...