From: ahoward Date: 2003-03-11T01:07:22+09:00 Subject: Re: DRB and threads On Mon, 10 Mar 2003, Brian Candler wrote: > Don't trap the SIGHUP. The child dies straight away, it gets respawned > straight away by Apache (which will keep a minimum of one child per fcgi > around unless you configure it otherwise), so the next request is handled > successfully. brian- i simplified my signal handlers for the MOD_FCGI class as def install_traps trap('SIGUSR2') do @@exit_requested = true end ... end and this seems to work really nicely. in otherwords, receiving USR2 causes a fcgi program to *always* handle the next request, and then reload itself. using this handler one can avoid a fcgi program bombing out in the middle of a request and bombing on the *next* request with 'internal server error' but the developer must reload twice to see any script changes made. this seems a reasonable price to pay if it prevents users from seeing web server errors or having their transactions rolled back because the program they're using has been updated... -a -- ==================================== | Ara Howard | NOAA Forecast Systems Laboratory | Information and Technology Services | Data Systems Group | R/FST 325 Broadway | Boulder, CO 80305-3328 | Email: ahoward@fsl.noaa.gov | Phone: 303-497-7238 | Fax: 303-497-7259 ====================================