-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
在swoole服务中, kafka生产者每过一段时间就报错 #69
Comments
是因为kafka收回了空闲的连接,而swoole这时候还没对连接销毁关闭,这phpkafka没有对connections.max.idle.ms进行支持,这时候你可以重写longlang\phpkafka\Client\SwooleClient |
这个异常问题什么时候可以修复下? |
@Yurunsoft 同样遇到这个问题 在 phpkafka/src/Client/SwooleClient.php Lines 145 to 154 in f154746
改成 // 忽略其他代码
} catch (Exception $e) {
if ($e instanceof SocketException && !$this->connected) {
return;
}
if ($e instanceof SocketException && $this->connected) {
$this->socket->close();
break;
}
$callback = $this->getConfig()->getExceptionCallback();
if ($callback) {
$callback($e);
} else {
throw $e;
}
} 就没出现报错了 |
原来是这样。。我说第一次投递消息后,一直有一个协程阻塞在 |
改成这样后,出现了新的错误,如下: |
你遇到了什么问题?
在swoole服务中, kafka生产者每过一段时间就报错
Kafka 环境是自建还是云服务?
自建
请执行下面的命令获取环境信息。
The text was updated successfully, but these errors were encountered: