https://issues.apache.org/bugzilla/show_bug.cgi?id=48769

           Summary: Processes in the busy list should not be killed during
                    graceful restarts
           Product: Apache httpd-2
           Version: 2.0.63
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_fcgid
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Created an attachment (id=25019)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25019)
Graceful restart patch

During graceful restarts mod_fcgid sends SIGTERM to its child processes, waits
one second, sends SIGKILL to them, then blocks until they are all reaped.  This
is a particularly bad method since the only safe time for a fastcgi worker
process to shut down is between requests.  For graceful restarts to be truely
graceful with mod_fcgid, all fastcgi requests need to complete in under 1
second.

Additionally, we've seen some servers where it takes several minutes for
mod_fcgid to reap all of its processes during graceful restarts.  This is
likely due the the fact that mod_fcgid is also trying to reap processes in the
free list which it didn't actually spawn.


An better method would be for mod_fcgid to not send SIGKILL and wait on the
processes in the busy list during graceful restarts.  The attached patch
attempts to go this route by keeping the shared memory, mutexes and pipes the
mod_fcgid process manager uses to communicate with bridged apache workers alive
across restarts.

This also changes the shutdown code so that it does not signal and attempt to
reap processes IDs that are in the free list.

I also changed the virtualhost part of the process tables to be a static string
instead of a pointer.  The results of the pointer comparisons were often
incorrect, resulting in the creation of multiple fastcgi classes for the same
exact virtualhost and location.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to