httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Zhakov <>
Subject mpm_winnt incompatible and broken behavior on restart
Date Wed, 12 Oct 2005 23:17:52 GMT
We have Apache/Subversion server under Windows Server 2003. And I was
come into problem with restarting server that process long request
(more than 180 seconds). It's usual for bug Subversion repository. I
see messages like this in error.log:
[Thu Oct 13 02:28:01 2005] [notice] Child 3952: Terminating 1 threads
that failed to exit.

I research problem and that mpm_winnt have hardcoded timeout for
stopping working threads:
/* Give busy worker threads a chance to service their connections */
    ap_log_error(APLOG_MARK,APLOG_NOTICE, APR_SUCCESS, ap_server_conf,
                 "Child %d: Waiting for %d worker threads to exit.",
my_pid, threads_created);
    end_time = time(NULL) + 180;
    while (threads_created) {
        rv = wait_for_many_objects(threads_created, child_handles,
end_time - time(NULL));
        if (rv != WAIT_TIMEOUT) {
            rv = rv - WAIT_OBJECT_0;
            ap_assert((rv >= 0) && (rv < threads_created));
            cleanup_thread(child_handles, &threads_created, rv);

After this timeout Apache terminate worker threads. Why is it? Why
mpm_winnt behavior incompatible to perfork behavior which waits
infinityle for stopping child processes? It causes really problems on
maintance and also doesn't permit use MaxRequestsPerChild option.

PS: Sorry if it is not right place for such questions.

Ivan Zhakov
View raw message