Debugging walkthrough

Matt Mackall mpm at selenic.com
Thu Dec 11 23:23:31 UTC 2014


On Thu, 2014-12-11 at 14:40 -0800, Demian Brecht wrote:
> Hi all,
> 
> A blog post I put up today detailing some debugging effort I put in,
> in hopes that it might help others should they encounter similar
> issues: http://demianbrecht.github.io/mercurial/2014/12/11/debugging-mercurial-400/

You cite this setting as the problem, but I think you've misread it:

https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestfieldsize

"A server needs this value to be large enough to hold _any one header_
field from a normal client request."

"Default 8190"

It works together with this one:

https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestfields

"The default value is defined by the compile-time constant
DEFAULT_LIMIT_REQUEST_FIELDS (100 as distributed)."


So that's a total of 800k of headers, each up to 8k. Your trace shows
about 10 headers, each 1k or less, for a total of just over 8k. So
you're a long way away from hitting the default limits.

Mercurial sets a limit on the length of each header to 1k on the server
side and reports it to the client thusly:

$ curl https://hg.python.org/cpython?cmd=capabilities
lookup changegroupsubset branchmap pushkey known getbundle unbundlehash
batch streamreqs=revlogv1,generaldelta unbundle=HG10GZ,HG10BZ,HG10UN
httpheader=1024

We've yet to bother to make this configurable... because 1k is well
within the limits of the default settings of every server we're
currently aware of.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list