[mod_python] child process XXXX still did not exit, sending a SIGTERM

Martin Blais blais at furius.ca
Mon Jan 2 13:23:43 EST 2006


Hi

I'm getting messages like this in my apache2 log when I stop it after
running requests to a mod_python-based web app:

==> /var/log/apache2/error_log <==
[Mon Jan 02 13:04:12 2006] [warn] child process 21806 still did not
exit, sending a SIGTERM
[Mon Jan 02 13:04:12 2006] [warn] child process 21768 still did not
exit, sending a SIGTERM
[Mon Jan 02 13:04:12 2006] [warn] child process 21792 still did not
exit, sending a SIGTERM
[Mon Jan 02 13:04:14 2006] [warn] child process 21806 still did not
exit, sending a SIGTERM
[Mon Jan 02 13:04:14 2006] [warn] child process 21768 still did not
exit, sending a SIGTERM
[Mon Jan 02 13:04:14 2006] [warn] child process 21792 still did not
exit, sending a SIGTERM
[Mon Jan 02 13:04:16 2006] [warn] child process 21806 still did not
exit, sending a SIGTERM
[Mon Jan 02 13:04:16 2006] [warn] child process 21768 still did not
exit, sending a SIGTERM
[Mon Jan 02 13:04:16 2006] [warn] child process 21792 still did not
exit, sending a SIGTERM
[Mon Jan 02 13:04:18 2006] [error] child process 21806 still did not
exit, sending a SIGKILL
[Mon Jan 02 13:04:18 2006] [error] child process 21768 still did not
exit, sending a SIGKILL
[Mon Jan 02 13:04:18 2006] [error] child process 21792 still did not
exit, sending a SIGKILL
[Mon Jan 02 13:04:19 2006] [info] removed PID file
/var/run/apache2.pid (pid=21754)
[Mon Jan 02 13:04:19 2006] [notice] caught SIGTERM, shutting down

I've been tracking the problem, and on exit, the cleanup function (in
Python) that I registered with the mod_python server does get called,
and exits.

I saw somewhere that recompiling expat, and then all the rest (in my
case, python-2.4.2, apache2, mod_python-3.1.4, psycopg2) might fix the
issue (it would be due to a library incompatibility).  I did this, and
the problem still occurs.  I also tried using mod_python-3.2.5b and
the problem persists.  This is all running on Linux (Gentoo).

Any clue on how to debug this issue further?  I'm currently trying to
run gdb on a non-daemon apache2, or trying to attach to a running
child.  The problem is a bit tricky to fix, since it does not happen
always -- but always happens at least after I run a lot of requests
e.g. my automated test suite for my web app.

Any hints would be appreciated.

cheers,



More information about the Mod_python mailing list