-
Notifications
You must be signed in to change notification settings - Fork 53
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
'max_request_execution_time' not working when 'enable_coroutine' => false #136
Comments
|
@doubaokun The Route::get('/foo', function (Request $request) {
for (;;){
}
return 'bar';
});
// config/octane.php
'swoole' => [
'options' => [
'max_request_execution_time' => 5,
]
] |
In real world applications, it should work. for (;;){ } is busy looping at CPU and there’s no chance for other code to be executed like termination. |
@doubaokun I tried this, but It still doesn't work: Route::get('/foo', function (Request $request) {
// 5s I/O operation
\Illuminate\Support\Facades\Http::get('https://reqres.in/api/users?delay=5');
return 'bar';
});
// config/octane.php
'swoole' => [
'options' => [
'max_request_execution_time' => 3,
]
] |
What version of OpenSwoole are you using (show your php --ri openswoole)? |
|
Will have another check later. |
@doubaokun Any news on this? |
It is the expected behavior, if you don't enable coroutines in your application, the application may be blocked at syscalls such as CURL, sockets etc. |
Is it possible to make 'max_request_execution_time' work for all HttpServer config, even when coroutine are disabled ?
The text was updated successfully, but these errors were encountered: