title: How change buffer-size in gunicorn(django) + nginx + docker
body: <p>My problem is that in some requests that application recive body size large(xml) and return xml large, the request returns 502. This occurs randomly. </p>
  
  <p>I think that it's running buffer overflow. </p>
  
  <p>My application running in docker with guinicorn like wsgi. And i want change value of buffer-size to 64k. how do I do that? </p>
  
  <p>my gunicorn deploy command</p>
  
  <pre><code>python manage.py migrate &amp;&amp; gunicorn backend.wsgi:application -b 0.0.0.0:8000 --workers 3 --log-level=info
  </code></pre>
  
  <p>I can be mistaken, my base in:
  <a href="https://stackoverflow.com/questions/22697584/nginx-uwsgi-104-connection-reset-by-peer-while-reading-response-header-from-u">Nginx uwsgi (104: Connection reset by peer) while reading response header from upstream</a></p>
  
  <p>Error log nginx</p>
  
  <pre><code>38286 upstream prematurely closed connection while reading response header from upstream
  </code></pre>