Welcome! Log In Create A New Profile

Advanced

Re: High CPU when upstream server down

March 08, 2011 03:35PM
Using the same config file - everything works fine and this is not reproducible on 0.8.54. Here is my config. Keep in mind that the upstream and server section are in reality 8 upstreams and servers - most of which are exactly the same with the exception of the server_name and the unix socket filename.


user www-data;
worker_processes 1;

error_log /var/log/nginx/error.log debug;
pid /var/run/nginx.pid;

events {
worker_connections 1024;
# multi_accept on;
}

http {
include /etc/nginx/mime.types;

access_log /var/log/nginx/access.log;

sendfile on;
#tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;
tcp_nodelay on;

gzip on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";

upstream dev.example.com {
server unix:/tmp/gunicorn_dev.example.com.sock;
# For a TCP configuration:
#server 127.0.0.1:8000;
}
server {
listen 80;
client_max_body_size 4G;
server_name dev.example.com;

keepalive_timeout 5;

# path for static files
root /var/www/dev-example-env/example/media;

location = /favicon.ico {
alias /var/www/dev-example-env/example/media/favicon.ico;
}

location = /robots.txt {

alias /var/www/dev-example-env/example/media/no_robots.txt;

}

location /img {
alias /var/www/dev-example-env/example/media/img/;
}

location /admin_media {
alias /var/www/dev-example-env/lib/python2.6/site-packages/django/contrib/admin/media/;
}




location / {

auth_basic "Restricted";
auth_basic_user_file "/var/www/dev-example-env/example/.htpasswd";

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;

if (!-f $request_filename) {
proxy_pass http://dev.example.com;
break;
}
}



error_page 500 502 503 504 /500.html;
location = /500.html {
alias /var/www/dev-example-env/example/templates/500.html;
}
}
}
Subject Author Posted

High CPU when upstream server down

adamn March 08, 2011 03:10PM

Re: High CPU when upstream server down

Ryan Malayter March 08, 2011 03:20PM

Re: High CPU when upstream server down

adamn March 08, 2011 03:35PM

Re: High CPU when upstream server down

Ryan Malayter March 08, 2011 04:48PM

Re: High CPU when upstream server down

adamn March 08, 2011 05:02PM

Re: High CPU when upstream server down

adamn March 08, 2011 07:33PM

Re: High CPU when upstream server down

Ryan Malayter March 08, 2011 10:22PM

Re: High CPU when upstream server down

adamn March 08, 2011 10:33PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 62
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready