Jedis配置
#Redis服务器地址
spring.redis.host=127.0.0.1
#Redis服务器连接密码(默认为空)
spring.redis.password=123456
#Redis服务器连接端口
spring.redis.port=6379
#连接超时时间(毫秒)
spring.redis.timeout=3000
#redis 连接池配置
#池中最大链接数
spring.redis.pool-config.max-total=256
#连接池中的最大空闲连接
spring.redis.pool-config.max-idle=3000
#连接池中的最小空闲连接
spring.redis.pool-config.min-idle=8
#连接池最大阻塞等待时间(使用负值表示没有限制)
spring.redis.pool-config.max-wait-millis=1000
#调用者获取链接时,是否检测当前链接有效性
spring.redis.pool-config.test-on-borrow=false
#向链接池中归还链接时,是否检测链接有效性
spring.redis.pool-config.test-on-return=false
#调用者获取链接时,是否检测空闲超时, 如果超时,则会被移除
spring.redis.pool-config.test-while-idle=true
#空闲链接检测线程一次运行检测多少条链接
spring.redis.pool-config.num-tests-per-eviction-run=8
#空闲链接检测线程检测周期。如果为负值,表示不运行检测线程。(单位:毫秒,默认为-layer)
spring.redis.pool-config.time-between-eviction-runs-millis=60000
#配置一个连接在池中最小生存的时间,单位是毫秒
spring.redis.pool-config.min-evictable-idle-time-millis=300000
客户端查看连接数
#netstat -an | grep 6379 | grep EST | wc -l