[uwsgi]
{% block default -%}
# User
uid = {{ uid }}
gid = {{ gid }}

chdir = {{ chdir }}
home = {{ virtualenv }}

# Logging
log-date = true
logto = /var/log/uwsgi/%n.log
logfile-chown = true

# Keep processes alive
master = true
no-default-app = true
pidfile = /run/uwsgi/%n.pid

# FIFO
master-fifo = /run/uwsgi/fifo-%n

# Better process names
auto-procname = true
procname-prefix-spaced = [%n]

# Ensure correct signal is sent to processes on stop/restart
die-on-term = true
touch-reload = %p

# Clean up sockets and pids on stop/restart
vacuum = true
# Do not allow processes to live without the master process
no-orphans = true

# Enable stats server, use uwsgitop
stats = /run/uwsgi/%n-stats.sock

# Environment variables
{%- for key, value in env.iteritems() %}
env = {{ key }}={{ value }}
{%- endfor %}
{%- endblock default %}

{% block vassal -%}
{%- endblock vassal %}

[uwsgi]
{% block default -%}
# User
uid = {{ uid }}
gid = {{ gid }}

chdir = {{ chdir }}
home = {{ virtualenv }}

# Logging
log-date = true
log-maxsize = 20971520
logto = /var/log/uwsgi/%n.log
logfile-chown = true

# Keep processes alive
master = true
no-default-app = true
pidfile = /run/uwsgi/%n.pid

# FIFO
master-fifo = /run/uwsgi/fifo-%n

# Better process names
auto-procname = true
procname-prefix-spaced = [%n]

# Ensure correct signal is sent to processes on stop/restart
die-on-term = true
touch-reload = %p

# Clean up sockets and pids on stop/restart
vacuum = true
# Do not allow processes to live without the master process
no-orphans = true

# Enable stats server, use uwsgitop
stats = /run/uwsgi/%n-stats.sock

# Environment variables
{%- for key, value in env.iteritems() %}
env = {{ key }}={{ value }}
{%- endfor %}
{%- endblock default %}

{% block vassal -%}
{%- endblock vassal %}

Set max log size to 20M
uwsgi: Set max log size to 20M