-
-
Notifications
You must be signed in to change notification settings - Fork 32
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 runtime error on stress test #171
Comments
SWOOLE_HOOK_ALL is the parameter for coroutine, I think the runtime/swoole is not ready for coroutine environment. By the way, symfony framework is not ready now for coroutine. You can imagine there are many requests are handling in one process, logic codes are switch frequently depends on current context, but symfony's DI cant provider the correct service object depends on context, it will bring some dirty variable and break the logic code. Unless you have a way to ensure the DI work correct on the swtichable context, runtime/swoole will not working well when open coroutine |
@ywisax services normallx dont Switch between requests and symfony and the runtime correcty reset services states via reset interface. As I think swoole works similar like roadrunner or frankenphp worker mode there should for symfony core be no problem. Sure some bundles my forgot to handle this and can fail with swoole but this should not be a problem with symfony bare skeleton. Or do you have an example which service need to be fixed in the symfony core which is not possible to handle multiple requests? |
You can remove
and try again, to confirm if there is related to coroutine. |
I stated this in a previous message:
So the problem seems to be with either |
This seems to have been fixed: |
When recieving a big number of requests (via stress test, for example) while having
hook_flags
set toSWOOLE_HOOK_ALL
, the Runtime triggers the following Swoole error:If I try to use the hook_flag in a bare Swoole server, without Symfony runtime, I get no error. Example:
This does not trigger any error on the same stress test.
Steps to reproduce:
return $this->json('Ok');
is enough) to/example
;docker run --rm -it williamyeh/wrk -c 100 -d 1 -t8 http://host.docker.internal:8000/example
;Simply changing the hook flags to something like
SWOOLE_HOOK_ALL & ~SWOOLE_HOOK_FILE & ~SWOOLE_HOOK_STDIO
makes the error go away, so I assume it's a problem that happens when logs are added.I also opened an issue here: swoole/swoole-src#5294
The text was updated successfully, but these errors were encountered: