httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmytro Fedonin - Sun Microsystems <Dmytro.Fedo...@Sun.COM>
Subject keepalive connection broken
Date Tue, 12 Jun 2007 16:50:44 GMT
Hi,

I have researched a problem with broken keepalive connections which is 
similar to bug# 41109. And I have found that in worker.c function
'int ap_graceful_stop_signalled(void)' returns listener_may_exit.
Basically all the code is like this:

int ap_graceful_stop_signalled(void)
/*....*/
{
     /* note: for a graceful termination, listener_may_exit will be set 
before
      *       workers_may_exit, so check listener_may_exit
      */
     return listener_may_exit;
}
And it causes keepalive connection to terminate abruptly if server 
process exceeds MaxRequestsPerChild.

In prefork.c for instance this function is different and states for:

int ap_graceful_stop_signalled(void)
{
     /* not ever called anymore... */
     return 0;
}

As far as it is called only from 'static int 
ap_process_http_connection(conn_rec *c)'
'if (ap_graceful_stop_signalled())
             break;' out of serving loop,
I believe 'ap_graceful_stop_signalled' to 'return 0' will solve the problem.
Have tried with trunk and 2.2.x branch with the same positive result.

Patch for trunk is attached.

-- 
Best regards,
Dmytro

Mime
View raw message