Closed speller closed 5 years ago
Thats actually really good question. @wolfy-j lets add TTK config maybe?
If you acknowledge that I can only KILL worker process (i.e. cause data corruption on looooong queries) - I'm fine doing that.
We can do TTK for request processing. If worker spend more than 60 seconds (for example) we will kill the worker and send 504 error to the client
That is correct, I'm pointing that I will have to physically KILL workers. Meaning you would have to be careful setting TTK.
It is kind of the same as max_execution_time but for RR.
Correct. I can work on it and on TTL as well.
Yes, killing a worker will be good approach. Thanks! Let's set 60 sec timeout by default.
Maybe RR could use some of php.ini settings as default value for RR. Drop in experience could get better.
We do not read php.ini in RR service at the moment. I'm currently planning to implement functionality to provide much more flexible control on worker livecycle in rr server, it will open the gate to functionality like max lifetime, proactive memory monitoring and adaptive scalers.
RR can read phpinfo()
or php -i
Available in 1.4.0, see sample config for configuration example https://github.com/spiral/roadrunner/blob/master/.rr.yaml
Available in 1.4.0, see sample config for configuration example https://github.com/spiral/roadrunner/blob/master/.rr.yaml
execTTL is solution for http service, but if i using roadrunner.Server
directly, how can i use exec TTL?
Hi,
you can attach the controller to any Server:
https://github.com/spiral/roadrunner/blob/master/server.go#L67 https://github.com/spiral/roadrunner/blob/master/controller.go#L4
You can implement any control logic inside it... or use the controller from Limit service:
https://github.com/spiral/roadrunner/tree/master/service/limit (you'll have to grab it from the config).
Or you can make your service expose Service() method and then you can point limit to it.
Hi, Is there a way to define request max execution time? If a script will enter an infinite loop (for example) it seems it will never be killed.