spring-boot-start-data-redis-reactive包使用趟过的坑

[2019-01-10 11:05:03] [INFO ] [io.lettuce.core.protocol.ConnectionWatchdog:106]-- Reconnecting, last destination was host/ip:port
[2019-01-10 11:05:03] [INFO ] [io.lettuce.core.protocol.ReconnectionHandler:111]-- Reconnected to host:port, Channel channel=0xf2d217fb, /ip:25550 -> host/ip:port
[2019-01-10 11:05:10] [INFO ] [io.lettuce.core.protocol.ConnectionWatchdog:106]-- Reconnecting, last destination was host/ip:port
[2019-01-10 11:05:10] [INFO ] [io.lettuce.core.protocol.ReconnectionHandler:111]-- Reconnected to host:port, Channel channel=0x688cbf8e, /ip:25551 -> host/ip:port
[2019-01-10 11:05:10] [INFO ] [io.lettuce.core.protocol.ConnectionWatchdog:106]-- Reconnecting, last destination was host/ip:port
[2019-01-10 11:05:10] [INFO ] [io.lettuce.core.protocol.ReconnectionHandler:111]-- Reconnected to host:port, Channel channel=0xf266dcbc, /ip:25552 -> host/ip:port
[2019-01-10 11:05:33] [INFO ] [io.lettuce.core.protocol.ConnectionWatchdog:106]-- Reconnecting, last destination was host/ip:port
[2019-01-10 11:05:33] [INFO ] [io.lettuce.core.protocol.ReconnectionHandler:111]-- Reconnected to host:port, Channel channel=0xd706f5e2, /ip:25553 -> host/ip:port
[2019-01-10 11:05:40] [INFO ] [io.lettuce.core.protocol.ConnectionWatchdog:106]-- Reconnecting, last destination was host/ip:port
[2019-01-10 11:05:40] [INFO ] [io.lettuce.core.protocol.ReconnectionHandler:111]-- Reconnected to host:port, Channel channel=0x29543207, /ip:25554 -> host/ip:port
[2019-01-10 11:05:40] [INFO ] [io.lettuce.core.protocol.ConnectionWatchdog:106]-- Reconnecting, last destination was host/ip:port
[2019-01-10 11:05:40] [INFO ] [io.lettuce.core.protocol.ReconnectionHandler:111]-- Reconnected to host:port, Channel channel=0xad71de60, /ip:25555 -> host/ip:port
[2019-01-10 11:06:03] [INFO ] [io.lettuce.core.protocol.ConnectionWatchdog:106]-- Reconnecting, last destination was host/ip:port
[2019-01-10 11:06:03] [INFO ] [io.lettuce.core.protocol.ReconnectionHandler:111]-- Reconnected to host:port, Channel channel=0x5781f808, /ip:25556 -> host/ip:port
[2019-01-10 11:06:10] [INFO ] [io.lettuce.core.protocol.ConnectionWatchdog:106]-- Reconnecting, last destination was host/ip:port
[2019-01-10 11:06:10] [INFO ] [io.lettuce.core.protocol.ReconnectionHandler:111]-- Reconnected to host:port, Channel channel=0xc0ab2538, /ip:25557 -> host/ip:port
[2019-01-10 11:06:10] [INFO ] [io.lettuce.core.protocol.ConnectionWatchdog:106]-- Reconnecting, last destination was host/ip:port
[2019-01-10 11:06:10] [INFO ] [io.lettuce.core.protocol.ReconnectionHandler:111]-- Reconnected to host:port, Channel channel=0x0dc5f68c, /ip:25558 -> host/ip:port
[2019-01-10 11:06:34] [INFO ] [io.lettuce.core.protocol.ConnectionWatchdog:106]-- Reconnecting, last destination was host/ip:port
[2019-01-10 11:06:34] [INFO ] [io.lettuce.core.protocol.ReconnectionHandler:111]-- Reconnected to host:port, Channel channel=0xf6012d5d, /ip:25560 -> host/ip:port
[2019-01-10 11:06:40] [INFO ] [io.lettuce.core.protocol.ConnectionWatchdog:106]-- Reconnecting, last destination was host/ip:port
[2019-01-10 11:06:40] [INFO ] [io.lettuce.core.protocol.ReconnectionHandler:111]-- Reconnected to host:port, Channel channel=0xcb89cf58, /ip:25561 -> host/ip:port
[2019-01-10 11:06:40] [INFO ] [io.lettuce.core.protocol.ConnectionWatchdog:106]-- Reconnecting, last destination was host/ip:port
[2019-01-10 11:06:40] [INFO ] [io.lettuce.core.protocol.ReconnectionHandler:111]-- Reconnected to host:port, Channel channel=0xb45a50d5, /ip:25562 -> host/ip:port
[2019-01-10 11:07:04] [INFO ] [io.lettuce.core.protocol.ConnectionWatchdog:106]-- Reconnecting, last destination was host/ip:port
[2019-01-10 11:07:04] [INFO ] [io.lettuce.core.protocol.ReconnectionHandler:111]-- Reconnected to host:port, Channel channel=0xc69092b3, /ip:25563 -> host/ip:port
[2019-01-10 11:07:10] [INFO ] [io.lettuce.core.protocol.ConnectionWatchdog:106]-- Reconnecting, last destination was host/ip:port
[2019-01-10 11:07:10] [INFO ] [io.lettuce.core.protocol.ReconnectionHandler:111]-- Reconnected to host:port, Channel channel=0x1fb4372e, /ip:25564 -> host/ip:port
[2019-01-10 11:07:10] [INFO ] [io.lettuce.core.protocol.ConnectionWatchdog:106]-- Reconnecting, last destination was host/ip:port
[2019-01-10 11:07:10] [INFO ] [io.lettuce.core.protocol.ReconnectionHandler:111]-- Reconnected to host:port, Channel channel=0xec5583ac, /ip:25565 -> host/ip:port

在开发中选用 spring-boot-starter-data-redis-reactive 包


            org.springframework.boot
            spring-boot-starter-data-redis-reactive
            2.0.5.RELEASE

内部引用包括了


            org.springframework.boot
            spring-boot-starter-data-redis

org.springframework.data
spring-data-redis
2.1.0.RELEASE

打开spring-data-redis的pom文件可以看到包括

5.0.4.RELEASE
2.9.0

redis.clients
jedis
${jedis}
true



io.lettuce
lettuce-core
${lettuce}
true


而开始的重连输出就是由包lettuce-core打印的,开始以为重连是因为连接redis失败导致的,放大了超时时间,没有用,于是研究官网说明没看到特殊配置,终于在https://github.com/lettuce-io/lettuce-core/issues/861看到了原因,

Lettuce is designed to maintain long-lived connections. Summarizing this issue, Lettuce behaves as designed as it reconnects after Redis disconnects idle connections regularly.

所以该提示只是包的info级别log,可以在日志配置文件中设置包日志输出级别

eg:



or
log4j.logger.my.pkg=info

转载于:https://www.cnblogs.com/doufuquanjia/p/10251709.html

你可能感兴趣的:(spring-boot-start-data-redis-reactive包使用趟过的坑)