日期:2014-05-16  浏览次数:20478 次

jedis常见问题 Frequently Asked Questions

?

jedis常见问题

如果你遇到?java.net.SocketTimeoutException: Read timed out exception的异常信息

请尝试在构造JedisPool的时候设置自己的超时值 JedisPool默认的超时时间是2秒

代码如下

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

poolConfig 配置文件 ? host 连接ip或域名 port连接端口 ?timeout 超时值?

?

原文:

Frequently Asked Questions

Page History

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.