title: git push large files fatal remote end hung up unexpectedly - apache proxypassreverse issue
body: <p>I have just <a href="https://stackoverflow.com/questions/3817478/setting-up-git-server-on-windows-with-git-http-backend-exe">setup git-http-backend on a WS2008 machine using Apache</a> and Basic Auth for pull and push.</p>
  
  <p>I can create a bare repository on the hosting server and clone it down with git clone <a href="http://user@server.com/repositories/Test.git" rel="nofollow noreferrer">http://user@server.com/repositories/Test.git</a></p>
  
  <p>This works fine, I can add files and push them back.  That all works great.  I thought I had it all working!</p>
  
  <p>I am now trying to put a few of my projects in (C# .net stuff).  I first tried just copying the .git directory and putting that on the server which seemed to have issues.  So I thought I would create a bare repo, clone it to local machine, copy in files then commit and push back to server.  All seems to work until I try and push my sln file.  At that point it goes through the compression and writing objects etc but errors with:</p>
  
  <pre><code>error: RPC failed; result=22, HTTP code = 417
  fatal:  The remote end hung up unexpectedly
  fatal:  The remote end hung up unexpectedly
  </code></pre>
  
  <p>In the Apache server error Log I have:</p>
  
  <pre><code>fatal: Needed a single revision
  fatal: Needed a single revision
  </code></pre>
  
  <p>The only thing I can see in the access.log is:</p>
  
  <pre><code>192.168.10.96 - - [22/Oct/2010:23:06:06 +0100] "GET /repositories/CodeTest.git/info/refs?  service=git-receive-pack HTTP/1.1" 200 153
  </code></pre>
  
  <p>After this point I can not longer get it to push even if I remove the sln file.  I am new to GIT and pretty confused as to what might be happening under the hood here.</p>
  
  <p>Any help or advice would be great.</p>
  
  <p><strong>EDIT</strong> so I can create a text file and rename it to test.sln and that works.  But if I create a text file and copy the contents of the sln file it will fail again.</p>
  
  <p><strong>EDIT 2</strong>
  Looks like it is not just SLN files but some of the files within a project / solution.  I have a solution that has multiple projects so I choose a single project that only had a few files and no SLN (did have proj file).  This also failed.</p>
  
  <p>I am beginning to feel it could be an encoding issue or a line termination with files created by VS2010 or something.  Not sure how to test this though.</p>
  
  <p><strong>EDIT 3</strong>
  It looks like it is large files that can't be pushed. I <a href="https://stackoverflow.com/questions/2702731/git-fails-when-pushing-commit-to-github">tried this</a> on both client and server config but it didn't fix it.</p>
  
  <p><strong>EDIT 4</strong>
  If I do everything on the server it self, create a new repo, clone empty repo, copy all files to new clone, git add and git commit then git push it all works.  This would suggest a network or timeout issue.  The clone I did was <a href="http://user@localhost" rel="nofollow noreferrer">http://user@localhost</a>.</p>
  
  <p><strong>EDIT 5</strong> 
  So it looks like the problem is with my network setup.  I have one external IP so all HTTP traffic comes into an Apache Linux box, most of my site is served from there but some uses other boxes so it uses proxy pass reverse to serve the content. I have a subdomain "git.myserver.com" for this.  Apache on the GIT server is actually on port 8000, if I open port 8000 on the external firewall and point it directly at the GIT server it works.  So I can only assume somewhere in the first apache server it is dieing.  just to confirm the fatal error is almost instant, so timeouts seem less likely.  Maybe the proxy pass reverse rewrites something, but why it only affects larger files is a mystery.</p>
  
  <p><strong>EDIT 6</strong>
  in the apache proxy server error.log I get:</p>
  
  <pre><code>[Mon Oct 25 11:41:06 2010] [error] (103)Software caused connection abort: proxy: pass request body failed to 192.168.10.97:8000 (192.168.10.97)
  [Mon Oct 25 11:41:06 2010] [error] proxy: pass request body failed to 192.168.10.97:8000 (192.168.10.97) from 62.133.24.54 ()
  </code></pre>
  
  <p>so it is looking like either the proxy it self fails or something on that machine thinks its bad.</p>
  
  <p>Thanks</p>