$ mojo version CORE Perl (v5.26.1, linux) Mojolicious (7.61, Doughnut) OPTIONAL EV 4.0+ (4.22) IO::Socket::Socks 0.64+ (n/a) IO::Socket::SSL 1.94+ (2.052) Net::DNS::Native 0.15+ (n/a) Role::Tiny 2.000001+ (2.000006)
Fr 2 Feb 09:52:31 [d] Mojolicious:131 POST "/some/report/data" Fr 2 Feb 09:52:31 [d] Mojolicious::Routes:162 Routing to controller "Controll::Some::Report" and action "data" Fr 2 Feb 09:53:03 [i] Mojo::Server::Prefork:128 Stopping worker 1526 gracefully (120 seconds) Fr 2 Feb 09:53:03 [i] Mojo::Server::Prefork:162 Worker 726 started Fr 2 Feb 09:53:10 [d] Mojolicious::Controller:211 200 OK (38.658608s, 0.026/s) Fr 2 Feb 09:53:10 [i] Mojo::Server::Prefork:173 Worker 1526 stopped
On each request workers go down and new one start. Browser get data successfully.
Another requests to other fast time actions has normal behavior - without stopping workers.
This is not very big problem but little bit miss proper.
Maximum amount of time in seconds stopping a worker gracefully may take before being forced, defaults to the value of "graceful_timeout" in Mojo::Server::Prefork. Note that this value should usually be a little larger than the maximum amount of time you expect any one request to take.
So you need to set graceful_timeout, not only inactivity_timeout to achieve desired behaviour.
спасибо, но there is no default helper for gracefull_timeout at that there is inactivity_timeout helper, поэтому получаются грабли у первопроходцев. Ведь всего лишь нужно изменить поведение на одном действии в контроллере.
How to change gracefull_timeout inside controller action only?
That makes no sense, you're misunderstanding something.--sebastian