UWSGI - mwicat/personal GitHub Wiki

Simple app

def application(env, start_response):
    start_response('200 OK', [('Content-Type','text/html')])
    return [b"Hello World"]
uwsgi --http :9090 --wsgi-file foobar.py

Tracebacker

Add to ini:

py-tracebacker = /tmp/uwsgi_tbsocket

Rewrite user

route-remote-user = old_user addvar:REMOTE_USER=new_user

Default statsd metrics

28 May 10:28:04 - DEBUG: uwsgi.core.routed_signals:0|c
28 May 10:28:04 - DEBUG: uwsgi.core.unrouted_signals:0|c
28 May 10:28:04 - DEBUG: uwsgi.core.busy_workers:0|g
28 May 10:28:04 - DEBUG: uwsgi.core.idle_workers:1|g
28 May 10:28:04 - DEBUG: uwsgi.core.overloaded:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.0.requests:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.0.delta_requests:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.0.failed_requests:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.0.respawns:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.0.avg_response_time:0|g
28 May 10:28:04 - DEBUG: uwsgi.worker.0.total_tx:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.0.rss_size:0|g
28 May 10:28:04 - DEBUG: uwsgi.worker.0.vsz_size:0|g
28 May 10:28:04 - DEBUG: uwsgi.worker.0.running_time:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.1.requests:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.1.delta_requests:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.1.failed_requests:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.1.respawns:1|c
28 May 10:28:04 - DEBUG: uwsgi.worker.1.avg_response_time:0|g
28 May 10:28:04 - DEBUG: uwsgi.worker.1.total_tx:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.1.rss_size:0|g
28 May 10:28:04 - DEBUG: uwsgi.worker.1.vsz_size:0|g
28 May 10:28:04 - DEBUG: uwsgi.worker.1.running_time:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.1.core.0.requests:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.1.core.0.write_errors:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.1.core.0.routed_requests:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.1.core.0.static_requests:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.1.core.0.offloaded_requests:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.1.core.0.exceptions:0|c
28 May 10:28:04 - DEBUG: uwsgi.worker.1.core.0.read_errors:0|c
28 May 10:28:04 - DEBUG: uwsgi.core.total_tx:0|c
28 May 10:28:04 - DEBUG: uwsgi.core.total_rss:0|g
28 May 10:28:04 - DEBUG: uwsgi.core.total_vsz:0|g
28 May 10:28:04 - DEBUG: uwsgi.core.avg_response_time:0|g
28 May 10:28:04 - DEBUG: uwsgi.core.total_running_time:0|c
28 May 10:28:04 - DEBUG: uwsgi.socket.0.listen_queue:0|g
28 May 10:28:04 - DEBUG: uwsgi.socket.1.listen_queue:0|g
28 May 10:28:04 - DEBUG: uwsgi.rss_size:0|c
28 May 10:28:04 - DEBUG: uwsgi.vsz_size:0|c