博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
java.net.SocketTimeoutException: Read timed out
阅读量:6853 次
发布时间:2019-06-26

本文共 879 字,大约阅读时间需要 2 分钟。

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  which has a lot of configuration parameters. We've set some defined ones which suit most of the cases. In case, you experience  tuning these parameters may help.

 

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

 

转载地址:http://lxfyl.baihongyu.com/

你可能感兴趣的文章
iOS日历显示农历信息
查看>>
win10系统配置java环境及遇到问题的一些处理方法
查看>>
记一次Selectable的误用
查看>>
动态规划略有所得 数字三角形(POJ1163)
查看>>
JavaScript中的常用编码
查看>>
HTML5 本地存储
查看>>
C#基础知识
查看>>
[网络流24题] 太空飞行计划 (最大权闭合子图---网络最大流)
查看>>
1、Monkey环境搭建
查看>>
JavaScript的事件监听、捕获和冒泡
查看>>
SpringMVC初写(三)Controller的生命周期
查看>>
Amixer 控制声音
查看>>
java中i++和++i的区别。
查看>>
python3编写网络爬虫17-验证码识别
查看>>
防XSS攻击
查看>>
形形色色的下拉菜单(特效菜单)
查看>>
C++ OpenSSL 之一:编译和使用
查看>>
Class.forName()的原理机制
查看>>
无网络联机打单机游戏---博客园老牛大讲堂
查看>>
#iOS问题记录#动态Html加载本地CSS和JS文件
查看>>