我使用Redis和Daemon进程以及常规缓存。
带有监控器的
timeout=300当前位于我的redis.conf文件中
有人建议在几个Git链接上将其改为timeout=0 (https://github.com/predis/predis/issues/33)。
我担心的是,如果我以0的形式执行超时,redis服务器将不会删除任何连接。
在一段时间内,我看到了获得max number of clients reached错误的机会
寻求更改超时的建议-在redis.conf >0
目前,我经常收到以下错误日志(每2-3分钟一次) timeout=300
{"message":"Error while reading line from the server. [tcp://10.10.101.237:6379]","context":
{"exception":{"class":"Predis\\Connection\\ConnectionException","message":"Error while reading
line from the server.
[tcp://10.10.101.237:6379]","code":0,"file":"/var/www/api/vendor/predis/predis/src/Connection/Ab
stractConnection.php:155"}},"level":400,"level_name":"ERROR","channel":"production","datetime":
{"date":"2020-09-23 07:14:01.207506","timezone_type":3,"timezone":"Asia/Kolkata"},"extra":[]}发布于 2021-04-27 20:21:00
我换了timeout = 0
一切正常!
PS:张贴这篇文章,在更改后2个月内进行观察。
https://stackoverflow.com/questions/64062313
复制相似问题