Our self-hosted Fisheye instance (Fisheye 4.7.0) has recently started failing to clone or pull a very popular mercurial repository.
When it fails to clone or pull, we get this sort of error:
Unable to pull from remote repository: http://xxx
- [abort: HTTP Error 431: Request Header Fields Too Large]
- pulling from http://xxx requesting all changes
In neither the Fisheye GUI nor the logs can I see what headers are being sent, but I have my suspicions that it's a list of branches and tags since Fisheye always grabs those first before doing the pull.
Here's the list of SCM activity (oldest first) that leads to this error:
hg --config ui.verbose=false init
hg --config ui.verbose=false branches -c
hg --config ui.verbose=false tags --debug
hg --config ui.verbose=false pull http://xxx
Does anyone know what we can do to stop Fisheye sending so many headers? We have many, many branches in this repo, and closing them (a feature that mercurial has) hasn't helped (and I didn't expect it to, since the "-c" arg in the branches command means to list closed branches as well as open ones).
We'd be perfectly happy to only clone and index the default branch in this repo.
Hello @Paul Cribdon ,
Welcome to the community. This issue happens because when Fisheye polls a Mercurial repository, it first lists all branches and tags, and then sends that list in the HTTP request to the remote server. In very large repos with hundreds or thousandsof branches/tags, this can push the request headers beyond the server's configured limit, resulting in the HTTP 431 error. closing branches in Mercurial doesn't help, as Fisheye still queries them(Including cloned ones).
The most reliable fix is to reduce the number of branches Fisheye tracks. In the repository's Advanced settings in Fisheye, set Tracked branches to only Default so it won't request all refs. Alternatively, you can maintain a local Mercurial mirror cloned with
hg clone -r default
and point fisheye to that mirror, this keeps the headers small and avoids the error. if you control the remote server, you could also raise its header size limit, but reducing tracked branches is cleaner and faster.
BR,
Satya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.