On 14-11-05 11:16 PM, Roberto De Ioris wrote:
Hi,
We're running uwsg server with following config:
# These setting are for test.juicenectar.com
[uwsgi]
env = xxx=xxx.settings.test_settings
master = true
processes = 4
module = jump.wsgi
uid = ubuntu
gid = ubuntu
http = :8002
daemonize = /var/log/app/uwsgi-test.log
# This is your virtualenv directory
home = /srv/app/.app-venv
socket = /tmp/uwsgi-test.sock
pidfile = /var/run/uwsgi-test.pid
vacuum = true
chmod-socket = 660
It hangs every 10-15 minutes and stops responding to health checks from
haproxy. Local test with lynx http://localhost:8000 shows it hangs
indeed, no response. We don't use nginx in front of uwsgi, probably
should.
Questions:
how to get debug output?
what it can be, why it hangs?
Thanks
--Roman
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
You need to give us much more details (like the kind of health check done
by haproxy and uwsgi logs). By the way you do not need "http =" as you are
adding another level of proxying. Just use --http-socket to instruct uwsgi
to natively speak http.
Thanks for suggestions.
We have configured it with http sockets.
Now connections go haproxy -> nginx -> uwsgi (was haproxy -> uwsgi)
haproxy:
backend be-120-080-app-test
fullconn 8192
option httpchk HEAD /check.txt HTTP/1.0
server nginx 127.0.0.1:7700 maxconn 8192
minconn 500 check inter 1s rise 3
Nginx:
upstream uwsgi {
server uwsgi-server:8002;
}
server {
listen 7700;
server_name sitename;
access_log /srv/www/sitename/logs/uwsgi-access.log main;
error_log /srv/www/sitename/logs/uwsgi-errors.log warn;
add_header Cache-Control "no-cache, max-age=0, must-revalidate,
proxy-revalidate";
add_header Pragma "no-cache";
expires 0s;
open_file_cache max=200 inactive=3600s;
client_header_buffer_size 2k;
client_header_timeout 5s;
large_client_header_buffers 20 32k;
client_body_timeout 5s;
send_timeout 5s;
# clustered support for 304 not modified
etag off;
if_modified_since before;
keepalive_requests 0;
location / {
uwsgi_param X-Real-IP $remote_addr;
include /etc/nginx/uwsgi_params;
uwsgi_pass uwsgi;
}
}
/etc/nginx/uwsgi_params are default.
Enable monitor tools (like the stat server + uwsgitop or the tracebacker)
to understand if uWSGI/yourapp hangs or haproxy has simply stopped sending
requests to it
haproxy drops backend since it couldn't get response in time.
Its still the case number of request sent to the uwsgi (relatively low though,
like continuous refresh with pressed F5 in browser).
--Roman
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi