title: git push via nginx reverse proxy stopped working (fatal: The remote end hung up unexpectedly)
body: <p>I have an issue with my git (Bitbucket). If I try to push a file, which is bigger than 8MB to my git remote, I get the following error message:</p>
  <blockquote>
  <p>fatal: The remote end hung up unexpectedly</p>
  </blockquote>
  <blockquote>
  <p>fatal: The remote end hung up unexpectedly</p>
  </blockquote>
  <blockquote>
  <p>Everything up-to-date</p>
  </blockquote>
  <p>The git remote is behind an Nginx reverse proxy, which has the following config:</p>
  <pre><code>server {
  listen 80;
  server_name proxy.bitbucket.sample;
  
  location / {
      proxy_set_header X-Forwarded-Host $host;
      proxy_set_header X-Forwarded-Server $host;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_pass http://bitbucket.sample:7990;
  
      proxy_connect_timeout 1800;
      proxy_send_timeout 1800;
      proxy_read_timeout 1800;
      send_timeout 1800;
      proxy_request_buffering off;
      client_max_body_size 0;
  
      proxy_http_version 1.1;
      proxy_set_header Connection &quot;&quot;;
  }
  </code></pre>
  <p>}</p>
  <p>The error.log of nginx is empty and the logs on bitbucket has the following message:</p>
  <pre><code>2020-08-20 10:32:50,672 INFO  [http-scmrequest-handler:thread-1007] sven @U5MKSCx632x20155x0 10.79.1.30,10.79.1.54 &quot;POST /scm/bitsystest/testimport2.git/git-receive-pack HTTP/1.1&quot; c.a.s.i.s.g.p.h.GitSmartExitHandler BITSYSTEST/testimport2[360]: Write request from 10.79.1.30 failed due to a socket timeout
  </code></pre>
  <p>This behavior just started a few days ago without any changes to the proxy or to bitbucket.</p>
  <p>The only solution I found on the internet was raising the <strong>http.postBuffer</strong>, which didn't work.</p>