jedis常见问题 Frequently Asked Questions jedisJedisPooltimeoutSockettimeoutexceptionjedis exception
程序员文章站
2022-07-13 11:03:36
...
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.
上一篇: vi/vim速查
下一篇: JS: 一个小例子引发的思考