Uncaught exception 'Re

来源:互联网 发布:java switch default 编辑:程序博客网 时间:2024/05/29 17:26
原文地址:exception 'RedisException' with message 'read&n">Uncaught exception 'RedisException' with message 'read&n作者:congcongbebe
最近把项目的redis缓存改成代理的方法,但是修改后一直报 Fatal error:Uncaught exception 'RedisException' with message 'read error onconnection' in XXX的错误

试了一些网上的方法,修改php.ini文件 ini_set('default_socket_timeout', -1); //不超时,升级redis版本,ping代理服务,各种方法都试了也是不行。

最后看了下一位播客仁兄的redis的配置说明

  listen: 127.0.0.1:6379 #使用哪个端口启动Twemproxy 
  redis: true#是否是Redis的proxy  
  hash: fnv1a_64 #指定具体的hash函数 
  distribution: ketama #具体的hash算法 
  auto_eject_hosts: true #是否在结点无法响应的时候临时摘除结点 
  timeout: 400 #超时时间(毫秒) 
  server_retry_timeout: 2000 #重试的时间(毫秒) 
  server_failure_limit: 1 #结点故障多少次就算摘除掉 
  servers: #下面表示所有的Redis节点(IP:端口号:权重) 
   - 127.0.0.1:6380:1 
   - 127.0.0.1:6381:1 
   -127.0.0.1:6382:1 
再对比了下自己的。发现redis:true这个配置没加上。。。坑啊。。。。
0 0
原创粉丝点击