如何解决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 举报,一经查实,本站将立刻删除。