Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

长时间删除二维码configId, 程序accessToken报错 无法有效兼容? 貌似对于accessToken的并发有点问题? #3354

Open
friends110110 opened this issue Aug 27, 2024 · 1 comment

Comments

@friends110110
Copy link

简要描述

程序批量跑删除二维码的 configId,大概跑了10来个小时突然报错,如下日志:
应该是token方面的原因?

模块版本情况

  • WxJava 模块名:
  • WxJava 版本号:

    com.github.binarywang
    weixin-java-cp
    4.6.0

详细描述

尽量详细描述。请不要使用截图,尽量使用文字描述,代码直接贴上来,日志则请附在后面所示区域。
挨个configId批量删除, 删除了10来个小时,有30来万个无用的二维码configId需要删除

        wxCpService.getExternalContactService().deleteContactWay(configId);

日志

org.springframework.data.redis.RedisSystemException: Redis command interrupted; nested exception is io.lettuce.core.RedisCommandInterruptedException: Command interrupted
	at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:62) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at org.springframework.data.redis.connection.lettuce.LettuceExceptionConverter.convert(LettuceExceptionConverter.java:41) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at org.springframework.data.redis.PassThroughExceptionTranslationStrategy.translate(PassThroughExceptionTranslationStrategy.java:44) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at org.springframework.data.redis.FallbackExceptionTranslationStrategy.translate(FallbackExceptionTranslationStrategy.java:42) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at org.springframework.data.redis.connection.lettuce.LettuceConnection.convertLettuceAccessException(LettuceConnection.java:277) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at org.springframework.data.redis.connection.lettuce.LettuceConnection.await(LettuceConnection.java:1085) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at org.springframework.data.redis.connection.lettuce.LettuceConnection.lambda$doInvoke$4(LettuceConnection.java:938) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at org.springframework.data.redis.connection.lettuce.LettuceInvoker$Synchronizer.invoke(LettuceInvoker.java:665) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at org.springframework.data.redis.connection.lettuce.LettuceInvoker.just(LettuceInvoker.java:94) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at org.springframework.data.redis.connection.lettuce.LettuceKeyCommands.ttl(LettuceKeyCommands.java:322) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at org.springframework.data.redis.connection.DefaultedRedisConnection.ttl(DefaultedRedisConnection.java:221) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at org.springframework.data.redis.connection.DefaultStringRedisConnection.ttl(DefaultStringRedisConnection.java:1428) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at org.springframework.data.redis.core.RedisTemplate.lambda$getExpire$12(RedisTemplate.java:866) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:224) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:191) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at org.springframework.data.redis.core.RedisTemplate.getExpire(RedisTemplate.java:866) ~[spring-data-redis-2.7.10.jar!/:2.7.10]
	at me.chanjar.weixin.common.redis.RedisTemplateWxRedisOps.getExpire(RedisTemplateWxRedisOps.java:32) ~[weixin-java-common-4.6.0.jar!/:?]
	at me.chanjar.weixin.cp.config.impl.AbstractWxCpInRedisConfigImpl.isAccessTokenExpired(AbstractWxCpInRedisConfigImpl.java:123) ~[weixin-java-cp-4.6.0.jar!/:?]
	at me.chanjar.weixin.cp.api.impl.WxCpServiceImpl.getAccessToken(WxCpServiceImpl.java:40) ~[weixin-java-cp-4.6.0.jar!/:?]
	at me.chanjar.weixin.cp.api.impl.BaseWxCpServiceImpl.executeInternal(BaseWxCpServiceImpl.java:337) ~[weixin-java-cp-4.6.0.jar!/:?]
	at me.chanjar.weixin.cp.api.impl.BaseWxCpServiceImpl.execute(BaseWxCpServiceImpl.java:289) ~[weixin-java-cp-4.6.0.jar!/:?]
	at me.chanjar.weixin.cp.api.impl.BaseWxCpServiceImpl.post(BaseWxCpServiceImpl.java:258) ~[weixin-java-cp-4.6.0.jar!/:?]
@friends110110 friends110110 changed the title 长时间删除二维码configId, 程序accessToken报错 无法有效兼容? 长时间删除二维码configId, 程序accessToken报错 无法有效兼容? 貌似对于accessToken的并发有点问题? Aug 27, 2024
@einsitang
Copy link

初步估计是你的删除太频繁了,然后每次删除的时候都经过redis检查accessToken,redis连接池不足导致产生的中断错误

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants