Closed GoogleCodeExporter closed 8 years ago
I'd like to encourage the proposed change, perhaps with even stronger wording.
We had issues with corrupt Mercurial clones at CPython's hg.python.org, which I
initially wrongly attributed to multithreading. It turns out that they were due
to the maximum-requests directive, which apparently terminates any pending
request after the shutdown timeout.
The problem was probably witnessed much more often in a multithreaded setup
because the shutdown timeout would affect many requests at once compared to a
multiprocess single-thread-per-process setup.
That the ConfigurationGuidelines page actually recommends setting
maximum-requests, without any warning, is clearly misleading.
See http://mercurial.selenic.com/bts/issue2595 for details and issue history.
Original comment by antoine.pitrou
on 23 Dec 2011 at 11:13
In mod_wsgi 4.0 there will be a new graceful-timeout option which can be
applied on top which gives a slightly more tolerant way of doing a restart
prior to a forced shutdown. During the graceful timeout option after maximum
requests is reached, it will still accept new requests but if the process
becomes idle and have no running requests it will immediately restart. If it
still reaches end of graceful timeout, then existing forced shutdown timeout
applies where no new requests will be accepted.
The short of it though is that maximum-requests should never be used in
production systems unless you have an absolute need to because you haven't been
able to fix a memory leak in your program. I didn't realise the documentation
was so strong in saying otherwise.
Note to self. Change wording of:
"""As a general recommendation it would probably be a good idea to use the
maximum requests option when running large installations of packages such
as Trac and !MoinMoin. Any large web site based on frameworks such as
Django, !TurboGears and Pylons or applications which use a database backend
may also benefit."""
in configuration guidelines document.
Original comment by Graham.Dumpleton@gmail.com
on 23 Dec 2011 at 9:45
Closing out documentation issues. Will pick up another time on github side when
get enough momentum to work on documentation again.
Original comment by Graham.Dumpleton@gmail.com
on 12 Nov 2014 at 10:14
Original issue reported on code.google.com by
w...@policystat.com
on 17 Dec 2010 at 9:07