Spring-Redis-Cache : Taking while to reconnect if we reboot redis on azure

433 Views Asked by At

We are using Lettuce recative redis with spring boot version 2.3.1-Release.We see a strange issue when we deploy our application on azure which connects to redis cache on azure.It is taking more than 15 min to reconnect if we reboot our redis app.But when we run the same app in local connect to azure redis instance from local,then it is taking less than 5 min to reconnect when there is reboot.

Do we have to change any config on azure or springboot app to force reconnect immediately once the connection is available.Following are our logs.

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
0

There are 0 best solutions below