[uwsgi] strict = true single-interpreter = true http = :8080 chdir = /var/app wsgi-file = application.py module = application:app master = true uid = worker gid = worker harakiri = 90 http-keepalive = 1 add-header = Connection:Keep-Alive buffer-size = 12288 disable-logging = true log-4xx = true log-5xx = true log-ioerror = true log-x-forwarded-for = true cache2 = name=uwsgi_cache,items=10 enable-threads = 1 lazy-apps = 1 import = ddtrace.bootstrap.sitecustomize ## https://uwsgi-docs.readthedocs.io/en/latest/Cheaper.html # maximum number of workers that can be spawned workers = $(UWSGI_WORKERS) # minimum number of workers to keep at all times cheaper = 5 # number of workers to spawn at startup cheaper-initial = 10 # how many workers should be spawned at a time cheaper-step = 5 # track busyness window in seconds cheaper-overload = 15 # percent busy worker triggers scale up cheaper-busyness-max = 50 # set cheaper algorithm to use cheaper-algo = spare # soft limit will prevent cheaper from spawning new workers # if workers total rss memory is equal or higher # UWSGI_CHEAPER_RSS_LIMIT_SOFT (values are in bytes) cheaper-rss-limit-soft = $(UWSGI_CHEAPER_RSS_LIMIT_SOFT) memory-report = true