【发布时间】:2021-01-11 16:23:24
【问题描述】:
我将 Redis 与守护进程以及常规缓存一起使用
-
带有主管的守护进程(Laravel Redis 队列)
-
定期缓存为键值对
timeout=300 目前在我的 redis.conf 文件中
有人建议在几个 Git 链接 (https://github.com/predis/predis/issues/33) 上将其更改为 timeout=0
我担心的是,如果我将超时设置为 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":[]}
【问题讨论】:
标签: redis supervisord