Fast-CGI application getting SIGKILL
"Loren Osborn" <[email protected]>
| Newsgroups | gmane.comp.web.fastcgi.devel |
|---|---|
| Message-ID | <[email protected]> |
FastCGI is supposed to handle 3 signals:
SIGUSR1: Sent by FastCGI to server-script when FastCGI wants it to
exit
(after next request)
SIGTERM: Similar to SIGUSR1, except usually passed from web server
to
FastCGI, then often passed through to server-script
SIGPIPE: Sent when client disconnects; Script should ignore, or
return
to request loop without wasting time generating more output.
Now for the tricky part:
If using FastCGI with Apache2 and Perl, perl often delays handling of
the signal until it's "safe" with regard to perl's multi-threaded
engine. By then, FastCGI has often forgotten it asked the server-script
to exit, sees it still running, and sends it another request... which
wakes the script up to handle the signal... which tells it to exit...
then FastCGI complains when it exits with no output.
Some recommend:
FastCgiConfig -initial-env PERL_SIGNALS=unsafe
to allow the signals to get handled immediately, but given how sticky
multi-threaded code can be, this is likely to leave your server-script
in an undefined/unstable state.
We are currently looking into mod_fcgid as a possible resolution to this
issue.
Hope this helps.
Regards,
-Loren
From:
fastcgi-developers-bounces+lsosborn=dis-sol-inc.com-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
[mailto:fastcgi-developers-bounces+lsosborn=dis-sol-inc.com-xGejAJT2w6whm7nkXjdb/[email protected]
cgi.com] On Behalf Of Victor Doss
Sent: Saturday, February 18, 2006 11:12 PM
To: fastcgi-developers-xGejAJT2w6xVgU18Zptdi0EOCMrvLtNR@public.gmane.org
Subject: [FASTCGI] Fast-CGI application getting SIGKILL
[truncated message}
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/