微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

redis碰到的问题

SpringBoot整合redis 连接报错:
Unable to connect to Redis; nested exception is org.springframework.data.redis.connection.PoolException: Could not get a resource from the pool; nested exception is io.lettuce.core.RedisConnectionException

解决方法:给访问redis设置密码
redis设置密码

终端中redis启动报错
WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
overcommit_memory 解决
给 /etc/sysctl.conf 配置文件添加 vm.overcommit_memory=1
并且

$ sysctl vm.overcommit_memory=1
vm.overcommit_memory = 1

再次查看配置,已经修改成1了
$ cat /proc/sys/vm/overcommit_memory 
1

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐