Sorry,
and additonal configuration:
nginx:
location / {
proxy_pass http://server;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
proxy_buffering on;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_connect_timeout 500;
proxy_read_timeout 500;
if (!-f $request_filename) {
proxy_pass http://server;
break;
}
}
gunicorn:
[program:xxx]
command=/usr/local/bin/gunicorn_django -w 2 -b 127.0.0.1:8002 --timeout
600 /usr/local/src/pythonapps/xxx/app/settings_production.py
directory=/usr/local/src/pythonapps/xxx
user=www-data
autostart=true
autorestart=true
stdout_logfile=/var/log/supervisor/xxx.supervisord.log
redirect_stderr=true
django:
using johnny cache with memcache for caching all select queries, so at
time of test app not touch a database
Thanks
ds
------- Forwarded message -------
From: "Dusan Simek" <pixelfie...@gmail.com>
To: django-users@googlegroups.com
Cc:
Subject: nginx gunicorn
Date: Mon, 19 Dec 2011 09:03:05 +0100
Hi guys,
I just finished with easy application based on django 1.3 and postgres and
deploy it to production using nginx, gunicorn and supervisor.
But now I have a big problem, because when I run a stress test (using ab
with params ab -c 100 -n 1000), my 2 core processor is totally overload,
running all the time on 100% and the site time out.
Please can anybody help me?
My configuration:
nginx:
worker_processes 1;
worker_rlimit_nofile 5120;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
events {
worker_connections 3074;
#multi_accept on;
}
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.