title | titleSuffix | description | ms.service | ms.manager | ms.topic | ms.date | monikerRange | ms.subservice |
---|---|---|---|---|---|---|---|---|
RPC failures and http.postBuffer |
Azure Repos |
RPC failures and http.postBuffer |
azure-devops-repos |
jepling |
conceptual |
01/22/2019 |
<= azure-devops |
azure-devops-repos-git |
[!INCLUDE version-lt-eq-azure-devops]
If you see an RPC failed
error during git push
, such as:
error: RPC failed; result=22, HTTP code = 404
error: RPC failed; result=22, HTTP code = 411
Unable to rewind rpc post data - try increasing http.postBuffer
error: RPC failed; result=56, HTTP code = 0
... and search for help on Stack Overflow or MSDN forums, you'll see a lot of old recommendations to set http.postBuffer
.
Don't do it! At least not blindly. First, review the suggestions in this article.
If you're still running a Git client that's version 2.8 or older, you should upgrade Git first. There are a bug fixes in newer versions of Git that should obviate the need to set http.postBuffer
.
We had enough support requests from internal users and external customers hitting bugs in older versions of Git that we decided to add a server-side reminder to Azure DevOps Services/TFS.
c:\mydir>git fetch
remote: Microsoft (R) Visual Studio (R) Team Services
remote: We noticed you're using an older version of Git. For a better experience, upgrade to the latest version at https://git-scm.com/downloads
remote: Found 4 objects to send. (6 ms)
Unpacking objects: 100% (4/4), done.
Check if these hotfixes are applicable if your TFS server is running Windows 2012 R2 or earlier:
- A large file upload or a large repository clone fails on VSO in Windows Server 2012 R2
- Pushing large files to Team Foundation Server by Git client hangs
If you're using a terrible proxy that's buggy or doesn’t support chunked encoding, you'll see errors for larger pushes. The same thing can happen if you put on-prem TFS behind a misconfigured load balancer. If the same push succeeds when bypassing the proxy, or bypassing the load balancer (e.g. by pushing to localhost from the server itself), then fix your proxy or load balancer instead!
This is the only scenario that we've seen where setting http.PostBuffer
is useful for newer versions of Git.
In our experience, it's more unnecessary than harmful, but there are a few negative side effects:
- Increasing it above the default may increase latency for larger pushes (since the client will buffer the HTTP request into larger chunks).
- If you set it larger than the HTTP chunk size limit for your HTTP server (e.g.
maxAllowedContentLength
andmaxRequestLength
inweb.config
for TFS servers), then all pushes larger than the chunk size limit will start failing.
To check if it's set, run:
git config --show-origin --get-all http.postBuffer
You may have to unset it in both your global .gitconfig
file:
git config --global --unset http.postBuffer
As well as in your repo level .git/config
(which overrides the global setting):
git config --local --unset http.postBuffer