Could not get a resource from the pool 错误解决
错误信息:Could not get a resource from the pool
可能造成错误原因:
1 没关闭Linux防火墙
查看防火墙状态
systemctl status firewalld.service
Active: active(running)
,说明防火墙是开启状态
关闭防火墙命令
systemctl stop firewalld.service
Active: inactive (dead)
,说明防火墙关闭
2 没有修改redis.conf文件
对redis.conf文件内容进行修改
(1)将redis.conf中的bind:127.0.0.1注释掉
(2)将redis.conf中的protected-mode yes改为protected-mode no
然后杀死原有redis进程并重新开启redis服务
ps -ef|grep redis
kill -9 进程号
3 SpringBoot中application.properties内容问题
连接延迟不要设置太小
spring.redis.timeout=18000000