最近写了一个服务通过springboot构建,里面使用了redis作为缓存,发布到服务器运行成功,但是有时候会报redis的错误:org.springframework.data.redis.RedisConnectionFailureException: java.net.SocketException: Broken pipe (Write failed); nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Broken pipe (Write failed)

  在网上查了一下原因是因为redis的客户端超时时间超时导致写入失败,然后我把配置文件的 timeout 参数设置为0 同时配置testOnReturn,testWhileIdle,testOnBorrow为true 这样就没有提示这样的错误了

#客户端超时时间
redis.timeout=0
#是否在从池中取出连接前进行检验,如果检验失败,则从池中去除连接并尝试取出另一个
redis.testOnBorrow=true
#在空闲时检查有效性, 默认false
redis.testWhileIdle=true
#是否进行有效性检查
redis.testOnReturn=true

 SpringBoot|MVC|SpringCloud

 技术交流QQ群号:216868740

redis报错:java.net.SocketException: Broken pipe (Write failed); nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: Broken pipe (Write failed)的更多相关文章

  1. redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: 断开的管道 (Write failed)

    昨晚,包发到测试环境中,出现redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketException: 断开的 ...

  2. Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed out

    问题: java连接不上redis. 异常信息: Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.ne ...

  3. Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: java.net.ConnectException: Connection refused (Connection refused)

    一.linux中配置redis,使用java连接测试时报错: Exception in thread "main" redis.clients.jedis.exceptions.J ...

  4. redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect time out

    redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect ti ...

  5. redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool

    超时 Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: jav ...

  6. 【java异常】redis.clients.jedis.exceptions.JedisConnectionException: Could not get a res

    产生此错误的原因通常是: 一.Redis没有启动: 我自己遇到一次这样的问题.汗! 二.由于防火墙原因无法连接到Redis; 1.服务器防火墙入站规则. 2.访问Redis的应用程序所在主机的出站规则 ...

  7. 【java异常】redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool

    产生此错误的原因通常是: 一.Redis没有启动: 我自己遇到一次这样的问题.汗! 二.由于防火墙原因无法连接到Redis; 1.服务器防火墙入站规则. 2.访问Redis的应用程序所在主机的出站规则 ...

  8. redis报错解决

    1.Connecting to node 127.0.0.17000 [ERR] Sorry, can't connect to node 192.168.1.917000 redis集群:Conne ...

  9. 那些年踩过的坑之Redis报错:All sentinels down, cannot determine where is mymaster master is running...

    1. 异常信息: All sentinels down, cannot determine where is mymaster master is running... 通过测试: @Test pub ...

随机推荐

  1. ORM(三)QuerySet查询字段操作

    这里的环境还是用上次的环境: Django项目:orm_practice app/models.py中有如下几个类: models.py publishing表内容如下: pid name 1 机械工 ...

  2. windowns10安装httpd

    下载页面:https://www.apachehaus.com/cgi-bin/download.plx 下载内容:httpd-2.4.38-o102r-x64-vc14-r2.zip 解压到本地磁盘 ...

  3. linux操作系统的前世今生

    linux操作系统是李纳斯-拖瓦兹于1970年正式发布第一个真正的内核版本,他也称Linux之父,Linux是由Unix发展而来,发展到现在Linux操作系统凭借着良好的性能和稳定性已被linux已被 ...

  4. winfrom SVG转Imge

    svg矢量图的使用,将svg矢量图展示在pictureBox上,拖动可以应用到其他设计软件上,复杂一点,中间涉及到SVG的下载  以及  SVG转化为 图片等操作 效果图如下: 源码下载地址: htt ...

  5. 积极参与开源项目,促进.NET Core生态社区发展

    今天早上在微信群里聊天聊到百度的SDK 已经支持.NET Core, 百度已经在3月份就支持了,想起当时还是我在他们的github上提的issue: https://github.com/Baidu- ...

  6. TensorFlow 2.0 Alpha pip安装指令

    TensorFlow 2.0 Alpha目前已经可以通过pip安装,亲测有效,安装指令为: # 普通版本 pip install tensorflow==2.0.0-alpha0 # GPU版本 pi ...

  7. MySQL学习(一)日志与索引 --- 2019年1月

    1.MySQL的架构 1).连接器 先根据Ip和端口号,用户名和密码,连接MySQL数据库,连接后如果没有下一步动作,连接就处于空闲状态,此时有一个连接超时时间的设置 wait_timeout默认8小 ...

  8. 解决 React-Native mac 运行报错 error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by ope

    React-Native 开发的项目,Android 方面没有任何问题,IOS 就是无法跑起来,报错信息如下: mac 10.14.4 xcode 10.2.1 error Failed to bui ...

  9. 【重学计算机】计组D2章:数据表示

    1.基本概念 真值:+0101,-0100:机器数: [x]原=0101 2.几种机器数 原码:x = -0101,[x]原 = 1101 反码:x = -0101,[x]反 = 1010 补码:x ...

  10. LogcatHelperDemo【应用log信息保存成本地文件】

    版权声明:本文为HaiyuKing原创文章,转载请注明出处! 前言 简单记录下LogcatHelper的使用,并对原有代码进行了修改[因为保存到应用内的目录中不需要申请权限,所以去掉保存到SD的功能- ...