Skip to content
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

响应时间较长的接口出现504或者502,后台程序则依然正常执行 #554

Open
daixinguo opened this issue Mar 22, 2024 · 0 comments

Comments

@daixinguo
Copy link

我无法通过修改nginx、php的超时限制来延长接口请求连接时长,它们总是在1分多钟出现502或者504

一个简单的测试

Route::get('ttt', function () {
for ($i = 0; $i < 30; $i++) {
dump($i);
sleep(10);
}
dump('ok');
return 'ok';
});

这个接口在请求1分多钟时就会断开 http状态码502
但是后台依然继续执行直到 输出 ok

在nginx、php的连接超时设置中都设置了超时时间为3600s(甚至php 代码里都加了 set_time_limit(0))依然出现这样的情况连接无法持久
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant