If you get java.net.SocketTimeoutException: Read timed out exception

Try setting own timeout value when constructing JedisPool using the following constructor:

JedisPool(GenericObjectPool.Config poolConfig, String host, int port, int timeout)

Default timeout value is 2 seconds.

JedisPool blocks after getting 8 connections

JedisPool defaults to 8 connections, you can change this in the PoolConfig:

JedisPoolConfig poolConfig = new JedisPoolConfig();
poolConfig.setMaxTotal(maxTotal); // maximum active connections
poolConfig.setMaxIdle(maxIdle); // maximum idle connections

Take into account that JedisPool inherits commons-pool BaseObjectPoolConfig which has a lot of configuration parameters. We've set some defined ones which suit most of the cases. In case, you experience issues tuning these parameters may help.

https://github.com/xetorthio/jedis/wiki/FAQ#jedispool-blocks-after-getting-8-connections

java.net.SocketTimeoutException: Read timed out的更多相关文章

  1. jsoup-提示java.net.SocketTimeoutException:Read timed out

    使用Jsoup.connect(url).get()连接某网站时偶尔会出现 java.net.SocketTimeoutException:Read timed out异常. 原因是默认的Socket ...

  2. idea 连接redis 出现 Caused by: java.net.SocketTimeoutException: connect timed out

    Exception in thread "main" redis.clients.jedis.exceptions.JedisConnectionException: java.n ...

  3. Exception in thread "main" java.net.SocketTimeoutException: connect timed ou错误处理

    今天做了一个Jsoup解析网站的项目,使用Jsoup.connect(url).get()连接某网站时偶尔会出现java.net.SocketTimeoutException:Read timed o ...

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

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

  5. java.net.SocketTimeoutException: Read timed out 错误解决

    这两天项目在测试环境下通过URLConnection 做数据传递时,出现了如下错误 java.net.SocketTimeoutException: Read timed out 经过查找研究,原因是 ...

  6. 报表使用hive数据源报java.net.SocketTimeoutException: Read timed out

    数据库表的数据量大概50W左右,在报表设计器下创建了hive的数据源,连接正常,由于数据量比较大,就用了润乾报表的大数据报表功能,报表设置好后,发布到页面中报错: 数据集ds1中,SQL语句SELEC ...

  7. aliyun oss 文件上传 java.net.SocketTimeoutException Read timed out 问题分析及解决

    upload ClientException Read timed out com.aliyun.openservices.ClientException: Read timed out        ...

  8. 使用 QQ 邮箱发送邮件报错:java.net.SocketTimeoutException: Read timed out. Failed messages: javax.mail.MessagingException: Exception reading response

    使用 QQ 邮箱发送邮件报错:java.net.SocketTimeoutException: Read timed out. Failed messages: javax.mail.Messagin ...

  9. 【Azure Redis 缓存 Azure Cache For Redis】Redis出现 java.net.SocketTimeoutException: Read timed out 异常

    问题描述 在使用Azure Redis时,遇见Read Timed out异常, Redis的客户端使用的时jedis.问题发生时,执行redis部分指令出错,大部分get指令,set指令能正常执行. ...

随机推荐

  1. ECharts 使用实例

    HTML与JavaScript代码: <%@ page language="java" contentType="text/html; charset=UTF-8& ...

  2. Maven自定义Archetype

    Maven提供了archetype帮助我们快速构建项目骨架,很便捷.但是,中央仓库中的archetype版本过于陈旧,构建好项目后,需要修改很多信息,甚是麻烦,那么如何自定义个archetype就显得 ...

  3. 一个跨域请求的XSS漏洞

    场景回顾 一个表单进行跨域提交的方式有很多,我们使用的采用隐藏iframe,在本域下放一个代理页面,通过服务端配合完成一次完整的请求. 首先,部署proxy.html代理页面.这个页面处理服务端返回的 ...

  4. linux之getcwd函数解析

    [lingyun@localhost getcwd]$ cat getcwd.c /********************************************************** ...

  5. python学习之路-11 多线程、多进程、协程

    python内置队列模块 queue queue的四种队列 q = queue.Queue() # 先进先出队列 q = queue.LifoQueue() # 后进先出队列 q = queue.Pr ...

  6. 从手工测试逆袭为NB自动化测试的学习路线

    在开始之前先学习两个工具商业web自动化测试工具请学习QTP:QTP的学习可以跳过,我是跳过了的.开源web自动化测试工具请学习Selenium:我当年是先学watir,再学selenium 这里主要 ...

  7. wifi_uplink脚本分析

    ~ >: vim apps/tools/wifi_uplink  #!/bin/sh # Copyright (C) 2012 GuoWenxue <guowenxue@gmail.com ...

  8. android自己定义ViewPager之——3D效果应用

    今天在github里看到一个3D效果的ViewPager,感觉做出来的ViewPager滑动的时候效果十分的炫,就check out下来研究了一下怎样实现的.以及怎样使用.将整个ViewPager稍加 ...

  9. XTU OJ 1209 Alice and Bob 2014(嘉杰信息杯ACM/ICPC湖南程序设计邀请赛暨第六届湘潭市程序设计竞赛)

    Problem Description The famous "Alice and Bob" are playing a game again. So now comes the ...

  10. hdu 5063 Operation the Sequence(Bestcoder Round #13)

    Operation the Sequence                                                                     Time Limi ...