首页 > 数据库 >org.springframework.data.redis.RedisSystemException: Redis exception; nested exception is io.lettuce

org.springframework.data.redis.RedisSystemException: Redis exception; nested exception is io.lettuce

时间:2023-06-08 14:57:53浏览次数:49  
标签:reset exception redis Redis RedisException nested io

springBoot + redis. 程序隔一段时间会莫名其妙的报Redis的错误. 报错如下:

org.springframework.data.redis.RedisSystemException: Redis exception; nested exception is io.lettuce.core.RedisException: java.io.IOException: Connection reset by peer

百度得知说: 是因为redis默认快照是关闭的, 导致了Redis连接不能持久化,通过stop-writes-on-bgsave-error值设置为no 可避免这种问题。

有两种设置方式:

通过命令修改的方式:
127.0.0.1:6379> config set stop-writes-on-bgsave-error no
1
修改redis.conf文件
vim或者vi 编辑redis.conf, 找到stop-writes-on-bgsave-error配置设置为no即可.

标签:reset,exception,redis,Redis,RedisException,nested,io
From: https://www.cnblogs.com/xiaojf/p/17466472.html

相关文章

  • uniapp打包所需的ios证书和证书profile文件获取的图文教程
    使用uniapp进行云打包,可以打包android和ios两种app,但是uniapp官方并不能凭空产生这两种平台所需的打包证书。那么这两种打包证书又是如何获取呢?android相对简单,使用jdk的工具生成就可以了,也可以使用香蕉云编来一键生成。但是ios证书的生成就没有这么简单,因为ios证书的生成需要......
  • LightOJ - 1374 Confusion in the Problemset (模拟)
    TimeLimit: 2000MSMemoryLimit: 32768KB64bitIOFormat: %lld&%lluLightOJ-1374ConfusionintheProblemsetSubmit StatusDescriptionAsmallconfusioninaproblemsetmayruinthewholecontest.So,mostoftheproblemsetterstrytheirbesttorem......
  • springboot - feign.FeignException$BadRequest: [400] during [GET] to [http:
    ERROR失败原因:、feign.FeignException$BadRequest:[400]during[GET]to[http://方法?携带的请求头条件。。。。。[ManualStockControllerFeign#deleteManualStockTaskByIds(List)]:<!doctypehtml><htmllang="en"><head><title>HTTPStatus400–Bad......
  • Wireshark - HTTP Continuation——就是大包分块传输
    Wireshark-HTTPContinuationby JeremyCanfield |  Updated: March9th,2020  |  WiresharkarticlesLet'stakeanexamplewherethereisafilenamedStage1.phponthewww.example.comwebserver,andStage1.phpcontainsthephraseHelloWorld. When......
  • CART——Classification And Regression Tree在python下的实现
    分类与回归树(CART——ClassificationAndRegressionTree))是一种非参数分类和回归方法,它通过构建二叉树达到预测目的。示例:1.样本数据集 2.运行结果-cart决策树的字典max_n_feats=3时tree_dict={house:{yes:agreen......
  • jackson annotations注解详解(转)
    官方WIKI:https://github.com/FasterXML/jackson-databind/wikijackson1.x和2.x版本的注解是放置在不同的包下的1.x是在jacksoncorejar包org.codehaus.jackson.annotate下2.x是在jackson-databind包com.fasterxml.jackson.annotation下jackson的自动检测机制jackson允许使用任意......
  • 使用ImportBeanDefinitionRegistrar处理自定义注解将类注册到容器中
    START两个自定义注解:@Documented@Target({ElementType.TYPE})@Retention(RetentionPolicy.RUNTIME)@Import(LogRegistry.class)public@interfaceEnableLog{StringbasePackage()default"";}该注解的作用是扫描指定的basePackage目录中使用了@Log注解的类,并将这......
  • error:java: compilation failed: internal java compiler error
    转自:https://xie.infoq.cn/article/537f575c166d556db9773002f java:Compilationfailed:internaljavacompilererror解决办法:1、查看项目的jdk(Ctrl+Alt+shift+S)File->ProjectStructure->ProjectSettings->Project2、查看工程的jdk(Ctrl+Alt+shift+S)File->Pr......
  • 判断两个矩形是否相交(Rect Intersection)
    0x00Preface最近在开发一个2D组态图形组件的过程中,里面的数学模块,涉及到两个矩形是否相交的判断。这个问题很多年前就写过,算是个小的算法吧。网络上搜索一下,有很多思路,有一些思路要基于多种组合的判断,显得比较复杂。比如两个矩形相交的情形,可能有下面的多种类型:而每种类型......
  • 苹果MR Vision Pro将会带动哪些零部件出货?
    苹果如何重新定义AR?在如今以智能手机为主的消费电子市场下行阶段,市场急需开辟一个新的领域带来新的增长点,以往被寄予厚望的VR/AR等头显设备在经历了数年发展后,依旧难堪大任,业界都把希望寄托在苹果身上。简单来说,VisionPro本质上其实还是VR设备,不过所有操作界面可以结合头显摄像头......