[uwsgi]
add-header = Connection: close
buffer-size = 65535
die-on-term = true
enable-threads = true
exit-on-reload = false
hook-master-start = unix_signal:15 gracefully_kill_them_all
{% if service_uwsgi_config_tls_backend | bool %}
https = {{ service_uwsgi_config_host }}:{{ service_uwsgi_config_http_port }},{{ service_uwsgi_config_tls_cert }},{{ service_uwsgi_config_tls_key }}
{% else %}
http = {{ service_uwsgi_config_host }}:{{ service_uwsgi_config_http_port }}
{% endif %}
http-auto-chunked = true
http-chunked-input = true
http-raw-body = true
lazy-apps = true
logto2 = /var/log/kolla/{{ service_uwsgi_config_log_dir }}/{{ service_uwsgi_config_log_file }}
{% if service_uwsgi_config_log_file_chmod is defined %}
logfile-chmod = {{ service_uwsgi_config_log_file_chmod }}
{% endif %}
{% if service_uwsgi_config_log_file_chown is defined %}
logfile-chown = {{ service_uwsgi_config_log_file_chown }}
{% endif %}
master = true
{% if service_uwsgi_config_module is defined %}
module = {{ service_uwsgi_config_module }}
{% elif service_uwsgi_config_wsgi_file is defined %}
wsgi-file = {{ service_uwsgi_config_wsgi_file }}
{% endif %}
plugins-dir = {{ '/usr/lib/uwsgi/plugins' if kolla_base_distro in ['ubuntu', 'debian'] else '/usr/lib64/uwsgi' }}
plugins = python3
processes = {{ service_uwsgi_config_workers }}
{% if service_uwsgi_config_socket_port | length > 0 %}
socket = {{ service_uwsgi_config_host }}:{{ service_uwsgi_config_socket_port }}
{% endif %}
socket-timeout = 30
thunder-lock = true
{% if service_uwsgi_config_uid is defined %}
uid = {{ service_uwsgi_config_uid }}
{% endif %}
worker-reload-mercy = {{ service_uwsgi_config_worker_timeout }}
static-map = /static=/var/lib/kolla/venv/lib/python3/site-packages/static
