简体   繁体   English

Predis超时与高流量站点

[英]Predis timeout with high traffic site

Im running a website with high traffic peaks (around 10k online users) and Im facing this error with Predis when the site exceeds around 7k online users: 我正在运行一个流量高峰的网站(大约10k在线用户),当网站超过大约7k在线用户时我和Predis面临这个错误:

PHP Fatal error:  Uncaught exception 'Predis\\Connection\\ConnectionException' with message 'Connection timed out [tcp://127.0.0.1:6379]'

The server is Intel Xeon 3.4GHz, 32GB RAM and SSD disks, with nginx for static content, apache and mysql. 服务器是Intel Xeon 3.4GHz,32GB RAM和SSD磁盘,nginx用于静态内容,apache和mysql。 Memory consumption never exceeds 9GB and CPU load is 4 in the peaks. 内存消耗从不超过9GB,峰值中的CPU负载为4。

Im not seeing PHP ouf of memory errors, nor MySQL gone away but only this Redis error. 我没有看到PHP的内存错误,MySQL也没有消失,只有这个Redis错误。 I put timeout 0 and ?read_write_timeout=0 with no luck. 我把超时0和?read_write_timeout = 0放在一起没有运气。 Can you help me? 你能帮助我吗?

Thanks and sorry for my english! 谢谢,抱歉我的英文!

Try setting the Redis "timeout" parameter in /etc/redis/redis.conf to some non-zero value. 尝试将/etc/redis/redis.conf中的Redis“timeout”参数设置为某个非零值。 This almost entirely resolved the issue for us. 这几乎完全解决了我们的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM