We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
error:Operation timed out after 60078 milliseconds with 0 out of -1 bytes received
The text was updated successfully, but these errors were encountered:
修改/src/ApolloCllient.php中超时时间大于60秒 protected $intervalTimeout = 80
Sorry, something went wrong.
我也遇到这个问题了。我查了一些材料后发现这个错误是PHP的CURL下载超时导致,通过curl_setopt($ch, CURLOPT_TIMEOUT, 0);去除超时限制可以去掉这个提示。但是setIntervalTimeout($intervalTimeout)方法的实现是:
curl_setopt($ch, CURLOPT_TIMEOUT, 0);
setIntervalTimeout($intervalTimeout)
public function setIntervalTimeout($intervalTimeout) { $intervalTimeout = intval($intervalTimeout); if ($intervalTimeout < 1 || $intervalTimeout > 300) { return; } $this->intervalTimeout = $intervalTimeout; }
也就是说无法通过正常的设置将超时时间设为0。不清楚作者当初将这个超时限制为1到300秒是出于什么样的考虑?@xiaodx12
CURLOPT_TIMEOUT是接收数据等待时间。start方法的CURLOPT_TIMEOUT没有包裹在trycatch里面,接收超时后会抛出异常,造成中断。apollo服务端会保持连接60秒。所以把intervalTimeout设置为大于60就可以了
No branches or pull requests
error:Operation timed out after 60078 milliseconds with 0 out of -1 bytes received
The text was updated successfully, but these errors were encountered: