[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

mpm_winnt incompatible and broken behavior on restart

From: Ivan Zhakov <chemodax_at_gmail.com>
Date: 2005-10-13 01:17:52 CEST

Hi!
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:
http://svn.apache.org/repos/asf/httpd/httpd/branches/2.0.x/server/mpm/winnt/child.c:child_main()
/* 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);
            continue;
        }
        break;
    }

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
Received on Thu Oct 13 01:18:36 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.