isOnline里面的Store::instance('gateway')->get(''.$client_id)

shentao
$address = Store::instance('gateway')->get(''.$client_id);

在保持一段时间链接后
这个就获取不到redis的数据
求问walkor 大神这是什么情况

这是日志

2015-11-10 00:28:54 worker exit with status 9
2015-11-10 00:28:54 worker exit with status 9
2015-11-10 00:28:54 worker exit with status 9
2015-11-10 00:28:54 worker exit with status 9
2015-11-10 00:28:54 worker exit with status 9
2015-11-10 00:28:54 worker exit with status 9
2015-11-10 00:28:54 worker exit with status 9
2015-11-10 00:28:54 worker exit with status 9
2015-11-10 00:28:54 worker exit with status 9
2015-11-10 00:28:54 worker exit with status 9
2015-11-10 00:28:54 worker exit with status 9
2702 9 0
9个回答

walkor

获取不到redis的数据,返回值是什么?

redis扩展貌似不稳定,新版本GatewayWorker已经开始去掉redis依赖了

  • 暂无评论
shentao

直接走进这里了

if(!$address)
{
echo 'address1:';
var_dump($address);
var_dump('client_id-'.$client_id.'is not exist');
return 0;
}

  • 暂无评论
shentao

其他位置获取还是可以的

public static $order = array(
'127.0.0.1:6379',
);

public static $user = array(
        '127.0.0.1:6379',
);

就是'gateway'这个有问题

  • 暂无评论
walkor

。。。

var_dump($address);
输出是???

  • 暂无评论
walkor

$client_id 已经下线了吧,你可以通过telnet 或者其它客户端查询下这个key是否有值

  • 暂无评论
shentao

var_dump($address);
这个输出是false

$client_id
我看到这个链接还在给我的服务器发心跳
应该是在线的

而且redis也存在这个连接的记录

  • 暂无评论
walkor

那就是redis扩展问题了

  • 暂无评论
shentao

升级扩展的版本能解决么
或者还有什么别的解决方案么

  • 暂无评论
walkor

不用redis,或者找个靠谱的redis客户端

  • 暂无评论
年代过于久远,无法发表回答
🔝