httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lothar =?unknown-8bit?Q?M=E4rkle?= <>
Subject mod_cgi and free_proc_chain
Date Mon, 16 Jun 2003 11:53:48 GMT

does anyone know how to increase the time apache will wait
before sending a SIGKILL to cgi-processes?
(Or to change the kill-policy used with subprocesses?)
problem background:

I'm using BerkeleyDB from my perl-cgi-scripts, but I don't know how
to close the database in case of signals in an reliable way. I do
this in my signal handler(SIGTERM and SIGPIPE), but occasionally
this closing takes longer than 3 seconds and then apache uses
SIGKILL to *kill* the child.
I believe that, since closing the database involves removing handles
from shared memory, the cgi-process is waiting for a exclusive lock
on the shared memory region.
There is nothing you can do about a SIGKILL, and so the shared memory
region is left inconsistent.
Since this a load-dependend issue, this time values should be set
in the config...but any ideas?

Reading the source I saw that free_proc_chain invokes the killing of
the subprocesses, and this cleanup is invoked before waiting
on a new connection. how can I prevent this cleanup from happening?

thx in advance,
Lothar Märkle -
Netpioneer GmbH - Beiertheimer Allee 18a - D-76137 Karlsruhe
Tel: 0721 / 9 20 60 43
Fax: 0721 / 9 20 60 30

View raw message