Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using Nginx + Gunicorn which is serving my Django project. All GET requests hang for ~1 min. The content seems to be available immediately as I can see it in the Browser inspector but the browser itself looks like it's still waiting for more data. Heres my Ngnix config

#allow for up to 3 connections per second.
limit_req_zone  $binary_remote_addr  zone=one:10m   rate=3r/s; 

server {
listen   80;

root /var/www/;

# serve directly - analogous for static/staticfiles
location /media/ {
    # this changes depending on your python version
    root /home/example/;
location /static/ {
    # if asset versioning is used
    if ($query_string) {
        expires max;
    root /var/www/;

location / {

    #Allow for a burst of 50.
    limit_req   zone=one burst=50 nodelay;
    proxy_pass_header Server;
    proxy_set_header Host $http_host;
    proxy_redirect off;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Scheme $scheme;
    proxy_connect_timeout 10;
    proxy_read_timeout 10;
    proxy_pass http://localhost:8001/;

# what to serve if upstream is not available or crashes
error_page 500 502 503 504 /media/50x.html;

My Gunicorn Config:

bind = ""
workers = 3
worker_class = "gevent"

Is there anything obvious that would be causing the requests to stay open for so long?

share|improve this question

Turns out the issue was my route to my static content was incorrect, causing it to block on each request.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.