首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >predis的redis超时

predis的redis超时
EN

Stack Overflow用户
提问于 2010-04-05 12:12:09
回答 2查看 9.9K关注 0票数 3

我在php中使用redis (predis在http://github.com/nrk/predis/),并且经常遇到超时。堆栈跟踪显示:

代码语言:javascript
复制
[04-Apr-2010 03:39:50] PHP Fatal error:  Uncaught exception 'Predis_ClientException' with message 'Connection timed out' in redis.php:697
Stack trace:
#0 redis.php(757): Predis_Connection->connect()
#1 redis.php(729): Predis_Connection->getSocket()
#2 redis.php(825): Predis_Connection->writeCommand(Object(Predis_Commands_ListRange))
#3 redis.php(165): Predis_ConnectionCluster->writeCommand(Object(Predis_Commands_ListRange))
#4 redis.php(173): Predis_Client->executeCommandInternal(Object(Predis_ConnectionCluster), Object(Predis_Commands_ListRange))
#5 redis.php(157): Predis_Client->executeCommand(Object(Predis_Commands_ListRange))
#6 [internal function]: Predis_Client->__call('lrange', Array)

这种情况一直在发生,我不知道为什么。有谁知道吗?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2010-07-12 12:34:51

我认为这是因为Redis默认关闭了空闲连接。

redis.conf

代码语言:javascript
复制
# Close the connection after a client is idle for N seconds (0 to disable)
timeout 0
票数 11
EN

Stack Overflow用户

发布于 2011-01-04 17:54:19

Redis Issues List上有一个未经确认的bug,请尝试将Redis更新到最新版本,看看问题是否仍然存在。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/2576882

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档