[Mojolicious] Re: Excessive stop/start hypnotoad workers

2018-02-07 Thread Mikhail


>
> That makes no sense, you're misunderstanding something.
>
> --
> sebastian 
>

okay, my misunderstood in that how to stand steady workers (avoid harakiri) 
when I increase inactivity_timeout action only. 

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.


[Mojolicious] Re: Excessive stop/start hypnotoad workers

2018-02-06 Thread Илья Рассадин
Looks like this is behaviour of a gracefull_timeout attribute of 
Mojo::Server::Hypnotoad
>From the docs 
https://metacpan.org/pod/Mojo::Server::Hypnotoad#graceful_timeout

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.

вторник, 6 февраля 2018 г., 8:52:54 UTC+3 пользователь Mikhail написал:
>
> $ 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.01+(2.06)
>>
>>
> Hi!
>
> I have a trouble with Mojolicious project serves by hypnotoad. My problem 
> occur on requesting heavy SQL data.
>
> I had increase $c->inactivity_timeout(600) in some controller action.
>
> At the log I see that the workers go down on that actions/requests:
>
> 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.
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mojolicious+unsubscr...@googlegroups.com.
To post to this group, send email to mojolicious@googlegroups.com.
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.