You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Aram Mirzadeh <aw...@qosina.com> on 1996/11/19 17:42:56 UTC

workaround for linux tcp bug

This is a simple, yet effective bug tracker for children that don't die.
I'm pretty sure it's a linux bug problem though. 

http_main.c:

int check_lost_servers ()
{
    int i;

    for (i = 0; i < HARD_SERVER_LIMIT; ++i) {
        if (scoreboard_image[i].status != SERVER_DEAD) {
            if (kill(scoreboard_image[i].pid,0)) { /* The process doesn't
exist!
 */
              int pid = scoreboard_image[i].pid;

              log_printf(server_conf,"Process %d slot %d is dead! clearing
slot"
,scoreboard_image[i].pid,i);
              /* Child died... note that it's gone in the scoreboard. */
              sync_scoreboard_image();
              (void)update_child_status (i, SERVER_DEAD, (request_rec*)NULL);
            }
        }
    }
}
--

And then, in standalone_main()

--
            log_printf(server_conf,
                "timed out");
        }

+       (void)check_lost_servers();

        sync_scoreboard_image();

There is a Linux developer currently trying to reproduce the problem.

Since I added this code my server has been running perfectly.

-- 
/*
 * Aram Mirzadeh, MIS Manager, Qosina Corp. http://www.qosina.com/~awm/
 * Apache Development Team, awm@hyperreal.com http://www.hyperreal.com/
 * PGP Key - http://www.qosina.com/~awm/pgpkey.html
 * BE 49 9D F6 2A A7 22 FC  02 E9 1E 3D F7 0C 67 A0
 *
 * The wise man doesn't give the right answers, he poses the right questions.
 * 							--Claude Levi-Strauss
 */