记录jedis.exceptions.JedisDataException

最近项目经常报错,由于用户的登录信息存储在redis中,故导致用户无法登陆,已登录状态也无法进行其他操作。
  • 关键信息:
    JedisDataException: ERR max number of clients reached

  • Redis报错信息

2018-01-26 11:05:20.365,INFO ,o.s.c.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'redis.clients.jedis.JedisPoolConfig#69830c53' of type [class redis.clients.jedis.JedisPoolConfig] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-01-26 11:05:20.383,INFO ,o.s.c.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'jedisPool' of type [class redis.clients.jedis.JedisPool] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
org.springframework.dao.InvalidDataAccessApiUsageException: ERR max number of clients reached; nested exception is redis.clients.jedis.exceptions.JedisDataException: ERR max number of clients reached
    at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:44) ~[spring-data-redis-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:36) ~[spring-data-redis-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:37) ~[spring-data-redis-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:37) ~[spring-data-redis-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.data.redis.connection.jedis.JedisConnection.convertJedisAccessException(JedisConnection.java:195) ~[spring-data-redis-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.data.redis.connection.jedis.JedisConnection.sMembers(JedisConnection.java:1879) ~[spring-data-redis-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.data.redis.core.DefaultSetOperations$7.doInRedis(DefaultSetOperations.java:130) ~[spring-data-redis-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.data.redis.core.DefaultSetOperations$7.doInRedis(DefaultSetOperations.java:127) ~[spring-data-redis-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:190) ~[spring-data-redis-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:152) ~[spring-data-redis-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:85) ~[spring-data-redis-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.data.redis.core.DefaultSetOperations.members(DefaultSetOperations.java:127) ~[spring-data-redis-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.data.redis.core.DefaultBoundSetOperations.members(DefaultBoundSetOperations.java:91) ~[spring-data-redis-1.4.2.RELEASE.jar:1.4.2.RELEASE]
    at org.springframework.session.data.redis.RedisSessionExpirationPolicy.cleanExpiredSessions(RedisSessionExpirationPolicy.java:111) ~[spring-session-1.0.2.RELEASE.jar:na]
    at org.springframework.session.data.redis.RedisOperationsSessionRepository.cleanupExpiredSessions(RedisOperationsSessionRepository.java:216) ~[spring-session-1.0.2.RELEASE.jar:na]
Caused by: redis.clients.jedis.exceptions.JedisDataException: ERR max number of clients reached
    at redis.clients.jedis.Protocol.processError(Protocol.java:113) ~[jedis-2.5.2.jar:na]
    at redis.clients.jedis.Protocol.process(Protocol.java:131) ~[jedis-2.5.2.jar:na]
    at redis.clients.jedis.Protocol.read(Protocol.java:200) ~[jedis-2.5.2.jar:na]
    at redis.clients.jedis.Connection.readProtocolWithCheckingBroken(Connection.java:285) ~[jedis-2.5.2.jar:na]
    at redis.clients.jedis.Connection.getBinaryMultiBulkReply(Connection.java:221) ~[jedis-2.5.2.jar:na]
    at redis.clients.jedis.BinaryJedis.smembers(BinaryJedis.java:1298) ~[jedis-2.5.2.jar:na]
    at org.springframework.data.redis.connection.jedis.JedisConnection.sMembers(JedisConnection.java:1877) ~[spring-data-redis-1.4.2.RELEASE.jar:1.4.2.RELEASE]
  • 解决方案:
暂未解决
  • 可能原因
飞哥在编写0208新年抽奖活动的代码,用redis做锁,可能导致redis出异常。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值