java.net.SocketTimeoutException: Read timed out

简介: If you get java.net.SocketTimeoutException: Read timed out exception Try setting own timeout value when constructing JedisPool using the following constructor: JedisPool(GenericObjectPool.

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

 

相关文章
|
3月前
|
Linux Windows
FinalShell连接Linux虚拟机报错java.net.ConnectException: Connection timed out: connect(亲测有效)
FinalShell连接Linux虚拟机报错java.net.ConnectException: Connection timed out: connect(亲测有效)
172 0
|
前端开发 Java 程序员
记录:java.net.SocketTimeoutException: connect timed out...【亲测有效】
记录:java.net.SocketTimeoutException: connect timed out...【亲测有效】
1846 0
|
3月前
|
NoSQL Linux 网络安全
解决Caused by: java.net.SocketTimeoutException: connect timed out Exception in thread “main“ redis.cli
解决Caused by: java.net.SocketTimeoutException: connect timed out Exception in thread “main“ redis.cli
|
10月前
|
分布式计算 运维 调度
Spark——成功解决java.util.concurrent.TimeoutException: Futures timed out after [600 seconds]
Spark——成功解决java.util.concurrent.TimeoutException: Futures timed out after [600 seconds]
11154 0
|
7月前
|
网络安全
Hdfs连接报错java.net.ConnectException: Connection timed out: no further information
Hdfs连接报错java.net.ConnectException: Connection timed out: no further information
223 0
|
Kubernetes jenkins 持续交付
jenkins slave节点运行在kubernetes构建mvn环境报错:java.io.IOException: Timed out waiting for websocket connectio
jenkins slave节点运行在kubernetes构建mvn环境报错:java.io.IOException: Timed out waiting for websocket connectio
205 0
|
Java
IDEA报错java.net.SocketTimeoutException:Read timed out
IDEA报错java.net.SocketTimeoutException:Read timed out
514 0
IDEA报错java.net.SocketTimeoutException:Read timed out
|
Web App开发 API Windows
一起谈.NET技术,Silverlight实例教程 - Out of Browser的Debug和Notifications窗口
  Silverlight 实例教程索引 Silverlight 实例教程 - Out of Browser开篇 Silverlight 实例教程 - Out of Browser配置,安装和卸载 Silverlight 实例教程 - Out of Browser的自定义应用 Silverligh...
1041 0
|
开发工具
一起谈.NET技术,Silverlight实例教程 - Out of Browser与Office的互操作
  Silverlight 实例教程索引 Silverlight 实例教程 - Out of Browser开篇 Silverlight 实例教程 - Out of Browser配置,安装和卸载 Silverlight 实例教程 - Out of Browser的自定义应用 Silverligh...
1016 0
一起谈.NET技术,Silverlight实例教程 - Out of Browser音乐播放器
  Silverlight 实例教程索引 Silverlight 实例教程 - Out of Browser开篇 Silverlight 实例教程 - Out of Browser配置,安装和卸载 Silverlight 实例教程 - Out of Browser的自定义应用 Silverligh...
1051 0