PHP-RedisException with message read error on connection

原因是Redis扩展基于php的socket方式实现,因此会受到socket的限制。
方法两种:
1.脚本添加:

ini_set('default_socket_timeout', -1);  //不超时  

2.改php.ini中的default_socket_timeout值。

以上内容摘录自:http://flyer0126.iteye.com/blog/1886635

事实上遇到这个情况的时候,八成存在瓶颈了,不是Redis成瓶颈了,就是其他操作阻塞造成问题了,如问题未解决,还是需要再深入跟进定位问题根源的。


未经允许不得转载:阿藏博客 » PHP-RedisException with message read error on connection

赞 (0) 打赏