> The relevant Nginx config is as follows:
>
> large_client_header_buffers 4 1m;
> location /hg/ {
>     proxy_pass http://127.0.0.1:8000/;
>     client_max_body_size 10g;
>     proxy_buffering off;
>     proxy_request_buffering off;
> }

Here's an insightful post on stack overflow:
https://stackoverflow.com/questions/54937220/meaning-of-max-size-of-nginx-large-client-header-buffers-directive

It might explain why you're seeing 431 (Too Many Headers) instead of
414 (Request-URI Too Large) or 400 (Bad Request) like in the relevant
nginx documentation for large_client_header_buffers.

Keeping in mind your large client header buffers config of 4 buffers
of 1M each, here's what I think happens: some headers from the hg
client exceed 1k, each of these larger-than-1k headers hg client sends
doesn't exceed 1M bytes, and some of these headers potentially even
fit inside one large buffer, but there are simply too many of such
headers.

Enabling experimental.httppostargs indeed works around this issue, but
tweaking the large_client_header_buffers setting a little bit more
should also work.
_______________________________________________
Mercurial mailing list
Mercurial@lists.mercurial-scm.org
https://lists.mercurial-scm.org/mailman/listinfo/mercurial

Reply via email to