Stash Clone of large repository behind haproxy fails

When I clone a large (1 GB) repository that is sitting behind an haproxy. It fails after a minute or so like this:

prompt$ git clone https://myurl/stash/scm/zra/webapp.git
Cloning into 'webapp'...
remote: Counting objects: 692893, done.
remote: Compressing objects: 100% (175584/175584), done.
error: RPC failed; result=56, HTTP code = 200 MiB | 545.00 KiB/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed


The clone works fine if I pull stash out from behind the proxy. I expect I'm configuring something wrong for large file transfers, but I am not sure whats wrong or what configuration option to set. Can somebody who is using haproxy in a production environment point me to some troubleshooting technique?



4 answers

Yes, I saw that KB article. I've adjusted the client side git config setting with:

postBuffer = 524288000

As another article mentioned and its working for now, hopefully it will stay working. My proxy config is pretty simple and is "mode http". If it breaks again, I will remove confidential information from the config and post it here.

Yes, this the page I saw, It wasn't a kb article after all.

The KB article I linked you to also has that suggestion.

0 vote

Hi Jeff,

Which proxy are you using? In the article below:

We talk about a specific parameter that could cause that in ngnix.

Could you please have a look and give us a feedback?

Best regards,
Thiago Bomfim
Atlassian Support - DevTools


Hi Thiago,

Thanks for the response.

As noted above, I'm using haproxy. Also, as shown in the command above, I'm trying to clone not push (in other words going the other direction). Does the article still apply?



0 vote

Hi jeff,

We've seen a similar error before and wrote this KB article:

Would you mind sharing your haproxy configuration?

Best regards,
Thiago Bomfim
Atlassian Support - DevTools

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

2,033 views 1 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you