Redisson Unable to init enough connections amount Only 20 of 24 were initialized
·
1.设置connectionMinimumIdleSize(最小空闲Redis连接量),有的版本默认是32有的是24
2.redis超时事件加大
3.如果设置后还是有问题,检查版本,如果是redisson3.16.5,升级到3.16.8版本即可
RedissonClient redisson() throws Exception {
Config config = new Config();
config.useSingleServer().setAddress("redis://"+redisProperties.getHost())
.setPassword(redisProperties.getPassword())
.setTimeout(redisProperties.getTimeout())
//在这里设置,可以放入yml里映射到对象上去都,也可先直接写死一个数,根据业务使用情况设置要有多少个长连接
.setConnectionMinimumIdleSize(redisProperties.getConnectionMinimumIdleSize())
.setConnectionPoolSize(redisProperties.getConnectionPoolSize());
return Redisson.create(config);
}
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐



所有评论(0)