title: HTTP request 408 error(Client request timeout) over mobile network. Django + Gunicorn + Nginx
body: <p>I have faced with strange issue. My API has endpoint on which i am using PATCH(tried also PUT and POST - same result) to send json with jsonarray(request body size typically is 40KB) from mobile phone. When i am doing this using Wi-Fi - all works fine. But if i am using mobile network, i am facing with SocketConnection Timeout(in Retrofit/Kotlin) with some phones(iOS works perfect). </p>
  
  <p>From nginx access.log :</p>
  
  <pre><code>domain - - [21/Nov/2017:16:33:01 +0000] "PATCH /endpoint/ HTTP/1.1" 408 0 "-" "Dalvik/2.1.0 (Linux; U; Android 6.0.1; Nexus 5 Build/M4B30Z)"
  </code></pre>
  
  <p>Nginx config :</p>
  
  <pre><code>server {
      listen port;
      server_name domain;
      client_max_body_size 32m;
      proxy_connect_timeout 75s;
      proxy_read_timeout 300s;
  
      location = /favicon.ico { access_log off; log_not_found off; }
      location /static/ {
        root /home/user/apps/api;
      }
  
  
       location / {
       include proxy_params;
       proxy_pass http://unix:/home/user/apps/api/api.sock;
  }
  
      listen 443 ssl; # managed by Certbot
  ssl_certificate /etc/letsencrypt/live/domain/fullchain.pem; # managed by Certbot
  ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem; # managed by Certbot
      include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
      ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
  </code></pre>
  
  <p>Gunicorn config :</p>
  
  <pre><code>respawn
  setuid root
  setgid www-data
  chdir /home/user/apps/api
  
  exec /home/user/virtualenvs/apienv/bin/gunicorn --workers 3 --timeout=90 --bind unix://api.sock api.wsgi:application
  </code></pre>