in reply to Re: Plack/FastCGI: how to make workers periodically die?
in thread Plack/FastCGI: how to make workers periodically die?
After consulting with [irc://irc.perl.org/#plack], there is a flag for that
00:07 mst : have your application set $env->{'psgix.harakiri'} e +very N requests should do the trick
Its mentioned in http://search.cpan.org/~miyagawa/PSGI-1.09_3/PSGI/Extentions.pod
psgix.harakiri: A boolean which is true if the PSGI server supports harakiri mode, that kills a worker (typically a forked child process) after the current request is complete.
psgix.harakiri.commit: A boolean which is set to true by the PSGI application or middleware when it wants the server to kill the worker after the current request.
|
|---|