我是靠谱客的博主 威武唇彩,最近开发中收集的这篇文章主要介绍记录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出异常。

最后

以上就是威武唇彩为你收集整理的记录jedis.exceptions.JedisDataException的全部内容,希望文章能够帮你解决记录jedis.exceptions.JedisDataException所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(42)

评论列表共有 0 条评论

立即
投稿
返回
顶部