spiral-modules / roadrunner-binary

💾 High-performance PHP application server, load-balancer and process manager written in Golang. RR2 releases repository.
MIT License
44 stars 25 forks source link

[EXT INTEGRATIONS] Laravel Octane with roadrunner unresponsive after benchmark #62

Closed dyanakiev closed 3 years ago

dyanakiev commented 3 years ago

Description:

Hello, i installed octane on plain laravel setup then i ran wrk -t12 -c400 -d30s http://localhost:8000/ to test, after it finished the octane/roadruner server become unresponsive and this error thrown in the browser

http_plugin_serve_http: Timeout:
    supervised_exec_with_context: context deadline exceeded

There are also more than 20 of this processes image

Is this normal behaviour? I hit it really hard but i would expect it to resurrect itself but it's still unresponsive even after few minutes. In another test Swoole handled the requests fine.

Steps To Reproduce:

  1. install laravel
  2. install octane with roadrunner
  3. run wrk -t12 -c400 -d30s http://localhost:8000/
wolfy-j commented 3 years ago

Hmmm, do you have any idea what is causing workers to reset? Is it part of your benchmark? Resetting will obviously load RR too much to behave well under benchmark.

rustatian commented 3 years ago

Hello @dyanakiev. That's totally not normal behavior. I mean, a bunch of the ./rr reset. I don't know why octane decided to reset the workers during the load test. ./rr reset operation is blocking operation because when you bombard the RR with wrk, reset operation wait on the mutex. Octane, in turn, for some reason, allocated a lot of the ./rr reset processes (reset backoff ??).

Regarding the allocate timeout error: It's normal because when you bombard RR, it holds a request until the worker is freed. But if the worker is busy with the actual work it can't get the next request in a queue. So, you need to increase allocate timeout or number of workers.

rustatian commented 3 years ago

@dyanakiev Hey. Since this is an external integration issue, it would be better to ask Octane maintainers about reset backoff. Feel free to re-open this issue if you would need help from our side.