UWSGI_RACK_RUBY30(1)

๐Ÿ“ฆ version 2.0.20, in ubuntu jammy

๐Ÿ’– NAME ๐Ÿ’–

okay bestie, welcome to the uwsgi_rack_ruby30(1) page โ€” User Commands energy only. This is the manual for uwsgi_rack_ruby30, aka the fast (pure C), self-healing, developer-friendly WSGI server. no cap. ๐Ÿ’…


โœจ SYNOPSIS โœจ

uwsgi-core-local [options...]

๐ŸŽ€ DESCRIPTION ๐ŸŽ€

okay so this is the whole options menu, and it's giving main character energy. every flag, every alias, every little detail โ€” we're keeping it all. let's go. ๐Ÿฆ‹

  • -s, --socket โ€” bind to the specified UNIX/TCP socket using the default protocol. classic.
  • -s, --uwsgi-socket โ€” bind to the specified UNIX/TCP socket using the uwsgi protocol.
  • --suwsgi-socket โ€” bind to the specified UNIX/TCP socket using the uwsgi protocol over SSL.
  • --ssl-socket โ€” bind to the specified UNIX/TCP socket using the uwsgi protocol over SSL. same vibe, different flag.
  • --http-socket โ€” bind to the specified UNIX/TCP socket using the HTTP protocol.
  • --http-socket-modifier1 โ€” force the specified modifier1 when using the HTTP protocol.
  • --http-socket-modifier2 โ€” force the specified modifier2 when using the HTTP protocol.
  • --http11-socket โ€” bind to the specified UNIX/TCP socket using HTTP 1.1 (Keep-Alive) protocol.
  • --https-socket โ€” bind to the specified UNIX/TCP socket using HTTPS protocol.
  • --https-socket-modifier1 โ€” force the specified modifier1 when using the HTTPS protocol.
  • --https-socket-modifier2 โ€” force the specified modifier2 when using the HTTPS protocol.
  • --fastcgi-socket โ€” bind to the specified UNIX/TCP socket using FastCGI protocol.
  • --fastcgi-nph-socket โ€” bind to the specified UNIX/TCP socket using FastCGI protocol (nph mode).
  • --fastcgi-modifier1 โ€” force the specified modifier1 when using FastCGI protocol.
  • --fastcgi-modifier2 โ€” force the specified modifier2 when using FastCGI protocol.
  • --scgi-socket โ€” bind to the specified UNIX/TCP socket using SCGI protocol.
  • --scgi-nph-socket โ€” bind to the specified UNIX/TCP socket using SCGI protocol (nph mode).
  • --scgi-modifier1 โ€” force the specified modifier1 when using SCGI protocol.
  • --scgi-modifier2 โ€” force the specified modifier2 when using SCGI protocol.
  • --raw-socket โ€” bind to the specified UNIX/TCP socket using RAW protocol.
  • --raw-modifier1 โ€” force the specified modifier1 when using RAW protocol.
  • --raw-modifier2 โ€” force the specified modifier2 when using RAW protocol.
  • --puwsgi-socket โ€” bind to the specified UNIX/TCP socket using persistent uwsgi protocol (puwsgi).
  • --protocol โ€” force the specified protocol for default sockets.
  • --socket-protocol โ€” force the specified protocol for default sockets. yep, same energy.
  • --shared-socket โ€” create a shared socket for advanced jailing or ipc.
  • --undeferred-shared-socket โ€” create a shared socket for advanced jailing or ipc (undeferred mode).
  • -p, --processes โ€” spawn the specified number of workers/processes.
  • -p, --workers โ€” spawn the specified number of workers/processes. twin flag.
  • --thunder-lock โ€” serialize accept() usage (if possible).
  • -t, --harakiri โ€” set harakiri timeout.
  • --harakiri-verbose โ€” enable verbose mode for harakiri.
  • --harakiri-no-arh โ€” do not enable harakiri during after-request-hook.
  • --no-harakiri-arh โ€” do not enable harakiri during after-request-hook. same thing, bestie.
  • --no-harakiri-after-req-hook โ€” do not enable harakiri during after-request-hook. third time's the charm.
  • --backtrace-depth โ€” set backtrace depth.
  • --mule-harakiri โ€” set harakiri timeout for mule tasks.
  • -x, --xmlconfig โ€” load config from xml file.
  • -x, --xml โ€” load config from xml file. alias energy.
  • --config โ€” load configuration using the pluggable system.
  • --fallback-config โ€” re-exec uwsgi with the specified config when exit code is 1.
  • --strict โ€” enable strict mode (placeholder cannot be used).
  • --skip-zero โ€” skip check of file descriptor 0.
  • --skip-atexit โ€” skip atexit hooks (ignored by the master).
  • --skip-atexit-teardown โ€” skip atexit teardown (ignored by the master).
  • -S, --set โ€” set a placeholder or an option.
  • --set-placeholder โ€” set a placeholder.
  • --set-ph โ€” set a placeholder. short and sweet.
  • --get โ€” print the specified option value and exit.
  • --declare-option โ€” declare a new uWSGI custom option.
  • --declare-option2 โ€” declare a new uWSGI custom option (non-immediate).
  • --resolve โ€” place the result of a dns query in the specified placeholder, sytax: placeholder=name (immediate option). (yes, "sytax" is exactly how it's spelled here, bestie, don't come for me.)
  • --for โ€” (opt logic) for cycle.
  • --for-glob โ€” (opt logic) for cycle (expand glob).
  • --for-times โ€” (opt logic) for cycle (expand the specified num to a list starting from 1).
  • --for-readline โ€” (opt logic) for cycle (expand the specified file to a list of lines).
  • --endfor โ€” (opt logic) end for cycle.
  • --end-for โ€” (opt logic) end for cycle. alias.
  • --if-opt โ€” (opt logic) check for option.
  • --if-not-opt โ€” (opt logic) check for option.
  • --if-env โ€” (opt logic) check for environment variable.
  • --if-not-env โ€” (opt logic) check for environment variable.
  • --ifenv โ€” (opt logic) check for environment variable. short king.
  • --if-reload โ€” (opt logic) check for reload.
  • --if-not-reload โ€” (opt logic) check for reload.
  • --if-hostname โ€” (opt logic) check for hostname.
  • --if-not-hostname โ€” (opt logic) check for hostname.
  • --if-hostname-match โ€” (opt logic) try to match hostname against a regular expression.
  • --if-not-hostname-match โ€” (opt logic) try to match hostname against a regular expression.
  • --if-exists โ€” (opt logic) check for file/directory existence.
  • --if-not-exists โ€” (opt logic) check for file/directory existence.
  • --ifexists โ€” (opt logic) check for file/directory existence. shortie.
  • --if-plugin โ€” (opt logic) check for plugin.
  • --if-not-plugin โ€” (opt logic) check for plugin.
  • --ifplugin โ€” (opt logic) check for plugin. yep.
  • --if-file โ€” (opt logic) check for file existance.
  • --if-not-file โ€” (opt logic) check for file existance.
  • --if-dir โ€” (opt logic) check for directory existance.
  • --if-not-dir โ€” (opt logic) check for directory existance.
  • --ifdir โ€” (opt logic) check for directory existance.
  • --if-directory โ€” (opt logic) check for directory existance. another alias, we love to see it.
  • --endif โ€” (opt logic) end if.
  • --end-if โ€” (opt logic) end if. same.
  • --blacklist โ€” set options blacklist context.
  • --end-blacklist โ€” clear options blacklist context.
  • --whitelist โ€” set options whitelist context.
  • --end-whitelist โ€” clear options whitelist context.
  • --ignore-sigpipe โ€” do not report (annoying) SIGPIPE.
  • --ignore-write-errors โ€” do not report (annoying) write()/writev() errors.
  • --write-errors-tolerance โ€” set the maximum number of allowed write errors (default: no tolerance).
  • --write-errors-exception-only โ€” only raise an exception on write errors giving control to the app itself.
  • --disable-write-exception โ€” disable exception generation on write()/writev().
  • --inherit โ€” use the specified file as config template.
  • --include โ€” include the specified file as immediate configuration.
  • --inject-before โ€” inject a text file before the config file (advanced templating).
  • --inject-after โ€” inject a text file after the config file (advanced templating).
  • -d, --daemonize โ€” daemonize uWSGI.
  • --daemonize2 โ€” daemonize uWSGI after app loading.
  • --stop โ€” stop an instance.
  • --reload โ€” reload an instance.
  • --pause โ€” pause an instance.
  • --suspend โ€” suspend an instance.
  • --resume โ€” resume an instance.
  • --connect-and-read โ€” connect to a socket and wait for data from it.
  • --extract โ€” fetch/dump any supported address to stdout.
  • -l, --listen โ€” set the socket listen queue size.
  • -v, --max-vars โ€” set the amount of internal iovec/vars structures.
  • --max-apps โ€” set the maximum number of per-worker applications.
  • -b, --buffer-size โ€” set internal buffer size.
  • -m, --memory-report โ€” enable memory report.
  • --profiler โ€” enable the specified profiler.
  • -c, --cgi-mode โ€” force CGI-mode for plugins supporting it.
  • -a, --abstract-socket โ€” force UNIX socket in abstract mode (Linux only).
  • -C, --chmod-socket โ€” chmod-socket.
  • -C, --chmod โ€” chmod-socket. (same as above, not a typo, bestie.)
  • --chown-socket โ€” chown unix sockets.
  • --umask โ€” set umask.
  • --freebind โ€” put socket in freebind mode.
  • --map-socket โ€” map sockets to specific workers.
  • -T, --enable-threads โ€” enable threads.
  • --no-threads-wait โ€” do not wait for threads cancellation on quit/reload.
  • --auto-procname โ€” automatically set processes name to something meaningful.
  • --procname-prefix โ€” add a prefix to the process names.
  • --procname-prefix-spaced โ€” add a spaced prefix to the process names.
  • --procname-append โ€” append a string to process names.
  • --procname โ€” set process names.
  • --procname-master โ€” set master process name.
  • -i, --single-interpreter โ€” do not use multiple interpreters (where available).
  • --need-app โ€” exit if no app can be loaded.
  • -M, --master โ€” enable master process.
  • --honour-stdin โ€” do not remap stdin to /dev/null.
  • --emperor โ€” run the Emperor.
  • --emperor-proxy-socket โ€” force the vassal to became an Emperor proxy.
  • --emperor-wrapper โ€” set a binary wrapper for vassals.
  • --emperor-wrapper-override โ€” set a binary wrapper for vassals to try before the default one.
  • --emperor-wrapper-fallback โ€” set a binary wrapper for vassals to try as a last resort.
  • --emperor-nofollow โ€” do not follow symlinks when checking for mtime.
  • --emperor-procname โ€” set the Emperor process name.
  • --emperor-freq โ€” set the Emperor scan frequency (default 3 seconds).
  • --emperor-required-heartbeat โ€” set the Emperor tolerance about heartbeats.
  • --emperor-curse-tolerance โ€” set the Emperor tolerance about cursed vassals.
  • --emperor-pidfile โ€” write the Emperor pid in the specified file.
  • --emperor-tyrant โ€” put the Emperor in Tyrant mode.
  • --emperor-tyrant-nofollow โ€” do not follow symlinks when checking for uid/gid in Tyrant mode.
  • --emperor-stats โ€” run the Emperor stats server.
  • --emperor-stats-server โ€” run the Emperor stats server.

โœจ OPTIONS โœจ

okay bestie, this is the big one โ€” every option, every default, every weird little alias. no cap, we're not skipping a single flag ๐Ÿ’–

  • --early-emperor โ€” spawn the emperor as soon as possibile. like, immediately immediately โœจ
  • --emperor-broodlord โ€” run the emperor in BroodLord mode. spooky name, serious business ๐Ÿฆ‹
  • --emperor-throttle โ€” set throttling level (in milliseconds) for bad behaving vassals (default 1000). they're on timeout fr fr โณ
  • --emperor-max-throttle โ€” set max throttling level (in milliseconds) for bad behaving vassals (default 3 minutes). the ultimate timeout ๐Ÿ’€
  • --emperor-magic-exec โ€” prefix vassals config files with exec:// if they have the executable bit. magic indeed โœจ
  • --emperor-on-demand-extension โ€” search for text file (vassal name + extension) containing the on demand socket name. sleuthing for sockets ๐Ÿ”
  • --emperor-on-demand-ext โ€” search for text file (vassal name + extension) containing the on demand socket name. same vibe, shorter name ๐Ÿ’…
  • --emperor-on-demand-directory โ€” enable on demand mode binding to the unix socket in the specified directory named like the vassal + .socket. directory era ๐ŸŽ€
  • --emperor-on-demand-dir โ€” enable on demand mode binding to the unix socket in the specified directory named like the vassal + .socket. the alias ate ๐Ÿ’…
  • --emperor-on-demand-exec โ€” use the output of the specified command as on demand socket name (the vassal name is passed as the only argument). command output as the answer ๐Ÿ‘‘
  • --emperor-extra-extension โ€” allows the specified extension in the Emperor (vassal will be called with --config). extra ext energy ๐ŸŒˆ
  • --emperor-extra-ext โ€” allows the specified extension in the Emperor (vassal will be called with --config). short and sweet ๐Ÿ’–
  • --emperor-no-blacklist โ€” disable Emperor blacklisting subsystem. no blacklist, only vibes ๐Ÿšซ
  • --emperor-use-clone โ€” use clone() instead of fork() passing the specified unshare() flags. clone() era ๐Ÿงฌ
  • --emperor-graceful-shutdown โ€” use vassals graceful shutdown during ragnarok. ragnarok but make it gentle ๐ŸŒธ
  • --emperor-cap โ€” set vassals capability. cap it off ๐Ÿ’™
  • --vassals-cap โ€” set vassals capability. plural alias, same energy โœจ
  • --vassal-cap โ€” set vassals capability. singular alias, still iconic ๐Ÿ’…
  • --imperial-monitor-list โ€” list enabled imperial monitors. show me the monitors ๐Ÿ“‹
  • --imperial-monitors-list โ€” list enabled imperial monitors. with an extra s, still lists them ๐Ÿ’–
  • --vassals-inherit โ€” add config templates to vassals config (uses --inherit). inherit the template energy ๐Ÿงฌ
  • --vassals-include โ€” include config templates to vassals config (uses --include instead of --inherit). include, not inherit, got it ๐Ÿ’…
  • --vassals-inherit-before โ€” add config templates to vassals config (uses --inherit, parses before the vassal file). before the vassal file, periodt โณ
  • --vassals-include-before โ€” include config templates to vassals config (uses --include instead of --inherit, parses before the vassal file). include before, slay ๐ŸŽ€
  • --vassals-start-hook โ€” run the specified command before each vassal starts. pre-game hook ๐ŸŽฌ
  • --vassals-stop-hook โ€” run the specified command after vassal's death. post-mortem hook ๐Ÿ’€
  • --vassal-sos โ€” ask emperor for reinforcement when overloaded. SOS bestie, send help ๐Ÿ†˜
  • --vassal-sos-backlog โ€” ask emperor for sos if backlog queue has more items than the value specified. backlog too long? SOS ๐Ÿ“ฃ
  • --vassals-set โ€” automatically set the specified option (via --set) for every vassal. set it for everyone ๐Ÿ’š
  • --vassal-set โ€” automatically set the specified option (via --set) for every vassal. singular alias, same set energy โœจ
  • --heartbeat โ€” announce healthiness to the emperor. heartbeat, health check, love that for us ๐Ÿ’“
  • --reload-mercy โ€” set the maximum time (in seconds) we wait for workers and other processes to die during reload/shutdown. mercy, but in seconds โฑ๏ธ
  • --worker-reload-mercy โ€” set the maximum time (in seconds) a worker can take to reload/shutdown (default is 60). workers get 60 seconds, no more ๐Ÿ’…
  • --mule-reload-mercy โ€” set the maximum time (in seconds) a mule can take to reload/shutdown (default is 60). mules also get 60 seconds ๐Ÿด
  • --exit-on-reload โ€” force exit even if a reload is requested. exit anyway, bye ๐Ÿ’€
  • --die-on-term โ€” exit instead of brutal reload on SIGTERM. die on term, dramatic but valid ๐Ÿซ 
  • --force-gateway โ€” force the spawn of the first registered gateway without a master. force spawn, no master needed ๐Ÿ‘‘
  • -h|--help โ€” show this help. the classic help, bestie ๐Ÿ’–
  • -h|--usage โ€” show this help. same help, different alias โœจ
  • --print-sym โ€” print content of the specified binary symbol. symbol printer go brrr ๐Ÿ”
  • --print-symbol โ€” print content of the specified binary symbol. longer name, same symbol ๐Ÿ’…
  • -r|--reaper โ€” call waitpid(-1,...) after each request to get rid of zombies. zombie cleanup era ๐ŸงŸ
  • -R|--max-requests โ€” reload workers after the specified amount of managed requests. reload after N requests ๐Ÿ”
  • --min-worker-lifetime โ€” number of seconds worker must run before being reloaded (default is 60). minimum 60 seconds on the clock โณ
  • --max-worker-lifetime โ€” reload workers after the specified amount of seconds (default is disabled). max lifetime, disabled by default ๐Ÿ’ค
  • --max-worker-lifetime-delta โ€” add (worker_id * delta) seconds to the max_worker_lifetime value of each worker. math but make it worker-y ๐Ÿงฎ
  • -z|--socket-timeout โ€” set internal sockets timeout. socket timeout, set it โฑ๏ธ
  • --no-fd-passing โ€” disable file descriptor passing. no fd passing, okay ๐Ÿšซ
  • --locks โ€” create the specified number of shared locks. locks, locks, locks ๐Ÿ”
  • --lock-engine โ€” set the lock engine. choose your lock engine ๐Ÿ”ง
  • --ftok โ€” set the ipcsem key via ftok() for avoiding duplicates. ftok() for no dupes โœจ
  • --persistent-ipcsem โ€” do not remove ipcsem's on shutdown. keep those ipcsems alive ๐Ÿ’œ
  • -A|--sharedarea โ€” create a raw shared memory area of specified pages (note: it supports keyval too). shared memory, raw and ready ๐Ÿง 
  • --safe-fd โ€” do not close the specified file descriptor. keep that fd safe ๐Ÿ›ก๏ธ
  • --fd-safe โ€” do not close the specified file descriptor. alias, still safe ๐Ÿ’…
  • --cache โ€” create a shared cache containing given elements. cache era, let's go ๐Ÿ’–
  • --cache-blocksize โ€” set cache blocksize. blocksize, set it ๐Ÿงฑ
  • --cache-store โ€” enable persistent cache to disk. persistent cache on disk ๐Ÿ’พ
  • --cache-store-sync โ€” set frequency of sync for persistent cache. sync frequency, important ๐Ÿ”„
  • --cache-no-expire โ€” disable auto sweep of expired items. no expire, no sweep ๐Ÿšซ
  • --cache-expire-freq โ€” set the frequency of cache sweeper scans (default 3 seconds). sweeper scans every 3 seconds by default ๐Ÿงน
  • --cache-report-freed-items โ€” constantly report the cache item freed by the sweeper (use only for debug). debug only, bestie โš ๏ธ
  • --cache-udp-server โ€” bind the cache udp server (used only for set/update/delete) to the specified socket. UDP server for set/update/delete ๐Ÿ“ก
  • --cache-udp-node โ€” send cache update/deletion to the specified cache udp server. send updates to that UDP node ๐Ÿ“ค
  • --cache-sync โ€” copy the whole content of another uWSGI cache server on server startup. copy the whole cache on startup ๐Ÿ“‹
  • --cache-use-last-modified โ€” update last_modified_at timestamp on every cache item modification (default is disabled). last_modified_at, disabled by default โณ
  • --add-cache-item โ€” add an item in the cache. add an item, simple ๐Ÿ’–
  • --load-file-in-cache โ€” load a static file in the cache. load that static file into cache ๐Ÿ“
  • --load-file-in-cache-gzip โ€” load a static file in the cache with gzip compression. same but with gzip compression ๐Ÿ—œ๏ธ
  • --cache2 โ€” create a new generation shared cache (keyval syntax). cache2, next gen โœจ
  • --queue โ€” enable shared queue. shared queue, enabled ๐Ÿ“ฅ
  • --queue-blocksize โ€” set queue blocksize. queue blocksize, set it ๐Ÿงฑ
  • --queue-store โ€” enable persistent queue to disk. persistent queue on disk ๐Ÿ’พ
  • --queue-store-sync โ€” set frequency of sync for persistent queue. queue sync frequency ๐Ÿ”„
  • -Q|--spooler โ€” run a spooler on the specified directory. spooler time ๐ŸŒ€
  • --spooler-external โ€” map spoolers requests to a spooler directory managed by an external instance. external spooler mapping ๐Ÿ—บ๏ธ
  • --spooler-ordered โ€” try to order the execution of spooler tasks. ordered tasks, we love order ๐Ÿงพ
  • --spooler-chdir โ€” chdir() to specified directory before each spooler task. chdir() before each task ๐Ÿ“‚
  • --spooler-processes โ€” set the number of processes for spoolers. spooler processes count ๐Ÿ”ข
  • --spooler-quiet โ€” do not be verbose with spooler tasks. quiet spooler, no yapping ๐Ÿคซ
  • --spooler-max-tasks โ€” set the maximum number of tasks to run before recycling a spooler. max tasks before recycle โ™ป๏ธ
  • --spooler-harakiri โ€” set harakiri timeout for spooler tasks. harakiri timeout, intense ๐Ÿ’€
  • --spooler-frequency โ€” set spooler frequency. spooler frequency โฑ๏ธ
  • --spooler-freq โ€” set spooler frequency. short alias, same freq ๐Ÿ’…
  • --mule โ€” add a mule. add a mule ๐Ÿด
  • --mules โ€” add the specified number of mules. add multiple mules ๐Ÿด๐Ÿด
  • --farm โ€” add a mule farm. add a mule farm ๐Ÿšœ
  • --mule-msg-size โ€” set mule message buffer size. mule message buffer size ๐Ÿ“จ
  • --signal โ€” send a uwsgi signal to a server. send a uwsgi signal ๐Ÿ“ถ
  • --signal-bufsize โ€” set buffer size for signal queue. signal queue buffer size ๐Ÿ“ฆ
  • --signals-bufsize โ€” set buffer size for signal queue. plural alias, same buffer ๐Ÿ’…
  • --signal-timer โ€” add a timer (syntax: <signal> <seconds>). timer syntax: <signal> <seconds> โฐ
  • --timer โ€” add a timer (syntax: <signal> <seconds>). short alias, same timer โณ
  • --signal-rbtimer โ€” add a redblack timer (syntax: <signal> <seconds>). redblack timer, fancy ๐ŸŒฒ
  • --rbtimer โ€” add a redblack timer (syntax: <signal> <seconds>). short alias, still redblack ๐Ÿ’œ
  • --rpc-max โ€” maximum number of rpc slots (default: 64). rpc slots max, default 64 ๐ŸŽฐ
  • -L|--disable-logging โ€” disable request logging. no logging, silence ๐Ÿค
  • --flock โ€” lock the specified file before starting, exit if locked. flock it, exit if locked ๐Ÿ”’
  • --flock-wait โ€” lock the specified file before starting, wait if locked. flock it, wait if locked โณ
  • --flock2 โ€” lock the specified file after logging/daemon setup, exit if locked. flock2, after logging/daemon setup ๐Ÿ”’
  • --flock-wait2 โ€” lock the specified file after logging/daemon setup, wait if locked. flock-wait2, wait after setup โณ
  • --pidfile โ€” create pidfile (before privileges drop). pidfile before privileges drop ๐Ÿ“„
  • --pidfile2 โ€” create pidfile (after privileges drop). pidfile after privileges drop ๐Ÿ“„
  • --safe-pidfile โ€” create safe pidfile (before privileges drop). safe pidfile before drop ๐Ÿ›ก๏ธ
  • --safe-pidfile2 โ€” create safe pidfile (after privileges drop). safe pidfile after drop ๐Ÿ›ก๏ธ
  • --chroot โ€” chroot() to the specified directory. chroot() into that directory ๐Ÿ 
  • --pivot-root โ€” pivot_root() to the specified directories (new_root and put_old must be separated with a space). pivot_root(), space-separated new_root and put_old ๐ŸŒ€
  • --pivot_root โ€” pivot_root() to the specified directories (new_root and put_old must be separated with a space). underscore alias, same pivot ๐Ÿ’…
  • --uid โ€” setuid to the specified user/uid. setuid to user/uid ๐Ÿ‘ค
  • --gid โ€” setgid to the specified group/gid. setgid to group/gid ๐Ÿ‘ฅ
  • --add-gid โ€” add the specified group id to the process credentials. add that gid to credentials โž•
  • --immediate-uid โ€” setuid to the specified user/uid IMMEDIATELY. IMMEDIATELY, no waiting ๐Ÿšจ
  • --immediate-gid โ€” setgid to the specified group/gid IMMEDIATELY. IMMEDIATELY, periodt ๐Ÿšจ
  • --no-initgroups โ€” disable additional groups set via initgroups(). no initgroups(), disable it ๐Ÿšซ
  • --cap โ€” set process capability. set process capability ๐Ÿ’ช
  • --unshare โ€” unshare() part of the processes and put it in a new namespace. unshare() into a new namespace ๐ŸŒŒ
  • --unshare2 โ€” unshare() part of the processes and put it in a new namespace after rootfs change. unshare2 after rootfs change ๐ŸŒ 
  • --setns-socket โ€” expose a unix socket returning namespace fds from /proc/self/ns. setns socket, fds from /proc/self/ns ๐Ÿ”Œ
  • --setns-socket-skip โ€” skip the specified entry when sending setns file descriptors. skip that entry when sending setns fds โญ๏ธ
  • --setns-skip โ€” skip the specified entry when sending setns file descriptors. short alias, same skip ๐Ÿ’…
  • --setns โ€” join a namespace created by an external uWSGI instance. join that external namespace ๐Ÿค
  • --setns-preopen โ€” open /proc/self/ns as soon as possible and cache fds. preopen /proc/self/ns and cache fds ๐Ÿ—‚๏ธ
  • --jailed โ€” mark the instance as jailed (force the execution of post_jail hooks). jailed, force post_jail hooks ๐Ÿš”
  • --refork โ€” fork() again after privileges drop. Useful for jailing systems. refork after privileges drop ๐Ÿ”
  • --re-fork โ€” fork() again after privileges drop. Useful for jailing systems. hyphen alias, same refork ๐Ÿ’…
  • --refork-as-root โ€” fork() again before privileges drop. Useful for jailing systems. refork as root before drop ๐Ÿ‘‘
  • --re-fork-as-root โ€” fork() again before privileges drop. Useful for jailing systems. hyphen alias, still root ๐Ÿ’…
  • --refork-post-jail โ€” does another fork() after jailing ๐Ÿ’… genuinely useful for jailing systems, bestie.
  • --re-fork-post-jail โ€” yeah it's the same energy: fork() again after jailing, and it's useful for jailing systems โœจ.

okay now we enter the HOOK ERA ๐ŸŽ€ โ€” these all run the hook you give them at a specific moment in the lifecycle. Say it with me: hooks are the main character ๐Ÿซถ

  • --hook-asap โ€” run the specified hook as soon as possible, like immediately-immediately ๐Ÿƒโ€โ™€๏ธ๐Ÿ’จ
  • --hook-pre-jail โ€” run the specified hook before jailing ๐Ÿ”’
  • --hook-post-jail โ€” run the specified hook after jailing ๐Ÿ—๏ธ
  • --hook-in-jail โ€” run the specified hook in jail, after initialization ๐Ÿ˜ญ
  • --hook-as-root โ€” run the specified hook before privileges drop ๐Ÿ‘‘
  • --hook-as-user โ€” run the specified hook after privileges drop ๐Ÿ™‡โ€โ™€๏ธ
  • --hook-as-user-atexit โ€” run the specified hook before app exit and reload ๐Ÿ’€
  • --hook-pre-app โ€” run the specified hook before app loading ๐Ÿ“ฆ
  • --hook-post-app โ€” run the specified hook after app loading โœจ
  • --hook-post-fork โ€” run the specified hook after each fork ๐Ÿด
  • --hook-accepting โ€” run the specified hook after each worker enters the accepting phase ๐Ÿซถ
  • --hook-accepting1 โ€” run the specified hook after the first worker enters the accepting phase ๐Ÿฅ‡
  • --hook-accepting-once โ€” run the specified hook after each worker enters the accepting phase (once per-instance) 1๏ธโƒฃ
  • --hook-accepting1-once โ€” run the specified hook after the first worker enters the accepting phase (once per instance) ๐Ÿฅ‡1๏ธโƒฃ
  • --hook-master-start โ€” run the specified hook when the Master starts ๐Ÿ‘‘
  • --hook-touch โ€” run the specified hook when the specified file is touched โ€” syntax: <file> <action> ๐Ÿซฐ
  • --hook-emperor-start โ€” run the specified hook when the Emperor starts ๐Ÿ‘‘โœจ
  • --hook-emperor-stop โ€” run the specified hook when the Emperor sends a stop message ๐Ÿ›‘
  • --hook-emperor-reload โ€” run the specified hook when the Emperor sends a reload message ๐Ÿ”„
  • --hook-emperor-lost โ€” run the specified hook when the Emperor connection is lost ๐Ÿ˜ญ๐Ÿ’”
  • --hook-as-vassal โ€” run the specified hook before exec()ing the vassal ๐Ÿงš
  • --hook-as-emperor โ€” run the specified hook in the emperor after the vassal has been started ๐Ÿ‘‘
  • --hook-as-mule โ€” run the specified hook in each mule ๐Ÿด
  • --hook-as-gateway โ€” run the specified hook in each gateway ๐Ÿšช
  • --after-request-hook โ€” run the specified function/symbol after each request ๐Ÿ’…
  • --after-request-call โ€” run the specified function/symbol after each request ๐Ÿ’… (yep, same vibe)

next up: the <b>EXEC</b> squad ๐Ÿƒโ€โ™€๏ธ โ€” same lifecycle moments, except you're running a command.

  • --exec-asap โ€” run the specified command as soon as possible ๐Ÿ’จ
  • --exec-pre-jail โ€” run the specified command before jailing ๐Ÿ”’
  • --exec-post-jail โ€” run the specified command after jailing ๐Ÿ—๏ธ
  • --exec-in-jail โ€” run the specified command in jail after initialization ๐Ÿ˜ญ
  • --exec-as-root โ€” run the specified command before privileges drop ๐Ÿ‘‘
  • --exec-as-user โ€” run the specified command after privileges drop ๐Ÿ™‡โ€โ™€๏ธ
  • --exec-as-user-atexit โ€” run the specified command before app exit and reload ๐Ÿ’€
  • --exec-pre-app โ€” run the specified command before app loading ๐Ÿ“ฆ
  • --exec-post-app โ€” run the specified command after app loading โœจ
  • --exec-as-vassal โ€” run the specified command before exec()ing the vassal ๐Ÿงš
  • --exec-as-emperor โ€” run the specified command in the emperor after the vassal has been started ๐Ÿ‘‘

now the <b>MOUNT</b> gang ๐Ÿงฒ

  • --mount-asap โ€” mount filesystem as soon as possible ๐Ÿ’จ
  • --mount-pre-jail โ€” mount filesystem before jailing ๐Ÿ”’
  • --mount-post-jail โ€” mount filesystem after jailing ๐Ÿ—๏ธ
  • --mount-in-jail โ€” mount filesystem in jail after initialization ๐Ÿ˜ญ
  • --mount-as-root โ€” mount filesystem before privileges drop ๐Ÿ‘‘
  • --mount-as-vassal โ€” mount filesystem before exec()ing the vassal ๐Ÿงš
  • --mount-as-emperor โ€” mount filesystem in the emperor after the vassal has been started ๐Ÿ‘‘

and the <b>UMOUNT</b> gang, matching set ๐Ÿงฒ๐Ÿ’”

  • --umount-asap โ€” unmount filesystem as soon as possible ๐Ÿ’จ
  • --umount-pre-jail โ€” unmount filesystem before jailing ๐Ÿ”’
  • --umount-post-jail โ€” unmount filesystem after jailing ๐Ÿ—๏ธ
  • --umount-in-jail โ€” unmount filesystem in jail after initialization ๐Ÿ˜ญ
  • --umount-as-root โ€” unmount filesystem before privileges drop ๐Ÿ‘‘
  • --umount-as-vassal โ€” unmount filesystem before exec()ing the vassal ๐Ÿงš
  • --umount-as-emperor โ€” unmount filesystem in the emperor after the vassal has been started ๐Ÿ‘‘

waiting era โณ โ€” let's pause dramatically until stuff exists.

  • --wait-for-interface โ€” wait for the specified network interface to come up before running root hooks ๐ŸŒ
  • --wait-for-interface-timeout โ€” set the timeout for wait-for-interface โฑ๏ธ
  • --wait-interface โ€” wait for the specified network interface to come up before running root hooks ๐ŸŒ (same, different name, we love options)
  • --wait-interface-timeout โ€” set the timeout for wait-for-interface โฑ๏ธ
  • --wait-for-iface โ€” wait for the specified network interface to come up before running root hooks ๐ŸŒ
  • --wait-for-iface-timeout โ€” set the timeout for wait-for-interface โฑ๏ธ
  • --wait-iface โ€” wait for the specified network interface to come up before running root hooks ๐ŸŒ
  • --wait-iface-timeout โ€” set the timeout for wait-for-interface โฑ๏ธ
  • --wait-for-fs โ€” wait for the specified filesystem item to appear before running root hooks ๐Ÿ—‚๏ธ
  • --wait-for-file โ€” wait for the specified file to appear before running root hooks ๐Ÿ“„
  • --wait-for-dir โ€” wait for the specified directory to appear before running root hooks ๐Ÿ“
  • --wait-for-mountpoint โ€” wait for the specified mountpoint to appear before running root hooks ๐Ÿงฒ
  • --wait-for-fs-timeout โ€” set the timeout for wait-for-fs/file/dir โฑ๏ธ
  • --wait-for-socket โ€” wait for the specified socket to be ready before loading apps ๐Ÿ”Œ
  • --wait-for-socket-timeout โ€” set the timeout for wait-for-socket โฑ๏ธ

the <b>CALL</b> crew ๐Ÿ“ž โ€” same lifecycle beats, but you're calling a function instead.

  • --call-asap โ€” call the specified function as soon as possible ๐Ÿ’จ
  • --call-pre-jail โ€” call the specified function before jailing ๐Ÿ”’
  • --call-post-jail โ€” call the specified function after jailing ๐Ÿ—๏ธ
  • --call-in-jail โ€” call the specified function in jail after initialization ๐Ÿ˜ญ
  • --call-as-root โ€” call the specified function before privileges drop ๐Ÿ‘‘
  • --call-as-user โ€” call the specified function after privileges drop ๐Ÿ™‡โ€โ™€๏ธ
  • --call-as-user-atexit โ€” call the specified function before app exit and reload ๐Ÿ’€
  • --call-pre-app โ€” call the specified function before app loading ๐Ÿ“ฆ
  • --call-post-app โ€” call the specified function after app loading โœจ
  • --call-as-vassal โ€” call the specified function() before exec()ing the vassal ๐Ÿงš
  • --call-as-vassal1 โ€” call the specified function(char *) before exec()ing the vassal ๐Ÿงš
  • --call-as-vassal3 โ€” call the specified function(char *, uid_t, gid_t) before exec()ing the vassal ๐Ÿงš
  • --call-as-emperor โ€” call the specified function() in the emperor after the vassal has been started ๐Ÿ‘‘
  • --call-as-emperor1 โ€” call the specified function(char *) in the emperor after the vassal has been started ๐Ÿ‘‘
  • --call-as-emperor2 โ€” call the specified function(char *, pid_t) in the emperor after the vassal has been started ๐Ÿ‘‘
  • --call-as-emperor4 โ€” call the specified function(char *, pid_t, uid_t, gid_t) in the emperor after the vassal has been started ๐Ÿ‘‘

config-loading era ๐Ÿ“œ

  • --ini โ€” load config from ini file ๐Ÿ“œ
  • -y, --yaml โ€” load config from yaml file ๐Ÿ’›
  • -y, --yml โ€” load config from yaml file ๐Ÿ’›
  • -j, --json โ€” load config from json file ๐Ÿงก
  • -j, --js โ€” load config from json file ๐Ÿงก

misc queen behaviour ๐Ÿ‘‘

  • --weight โ€” weight of the instance (used by clustering/lb/subscriptions) โš–๏ธ
  • --auto-weight โ€” set weight of the instance (used by clustering/lb/subscriptions) automatically ๐Ÿค–โš–๏ธ
  • --no-server โ€” force no-server mode ๐Ÿšซ๐Ÿ–ฅ๏ธ
  • --command-mode โ€” force command mode โŒจ๏ธ
  • --no-defer-accept โ€” disable deferred-accept on sockets ๐Ÿšซ
  • --tcp-nodelay โ€” enable TCP NODELAY on each request ๐Ÿš€
  • --so-keepalive โ€” enable TCP KEEPALIVEs ๐Ÿซถ
  • --so-send-timeout โ€” set SO_SNDTIMEO โฑ๏ธ
  • --socket-send-timeout โ€” set SO_SNDTIMEO โฑ๏ธ
  • --so-write-timeout โ€” set SO_SNDTIMEO โฑ๏ธ
  • --socket-write-timeout โ€” set SO_SNDTIMEO โฑ๏ธ
  • --socket-sndbuf โ€” set SO_SNDBUF ๐Ÿ“ค
  • --socket-rcvbuf โ€” set SO_RCVBUF ๐Ÿ“ฅ
  • --shutdown-sockets โ€” force calling shutdown() in addition to close() when sockets are destroyed ๐Ÿ”Œ๐Ÿ’€
  • --limit-as โ€” limit processes address space/vsz ๐Ÿšง
  • --limit-nproc โ€” limit the number of spawnable processes ๐Ÿšง
  • --reload-on-as โ€” reload if address space is higher than specified megabytes ๐Ÿ”„
  • --reload-on-rss โ€” reload if rss memory is higher than specified megabytes ๐Ÿ”„
  • --evil-reload-on-as โ€” force the master to reload a worker if its address space is higher than specified megabytes ๐Ÿ˜ˆ๐Ÿ”„
  • --evil-reload-on-rss โ€” force the master to reload a worker if its rss memory is higher than specified megabytes ๐Ÿ˜ˆ๐Ÿ”„
  • --mem-collector-freq โ€” set the memory collector frequency when evil reloads are in place ๐Ÿงน
  • --reload-on-fd โ€” reload if the specified file descriptor is ready ๐Ÿ”„
  • --brutal-reload-on-fd โ€” brutal reload if the specified file descriptor is ready ๐Ÿ’€๐Ÿ”„
  • --ksm โ€” enable Linux KSM ๐Ÿง
  • --pcre-jit โ€” enable pcre jit (if available) โšก
  • --never-swap โ€” lock all memory pages avoiding swapping ๐Ÿ”’๐Ÿ’พ
  • --touch-reload โ€” reload uWSGI if the specified file is modified/touched ๐Ÿซฐ๐Ÿ”„
  • --touch-workers-reload โ€” trigger reload of (only) workers if the specified file is modified/touched ๐Ÿซฐ๐Ÿ”„
  • --touch-mules-reload โ€” reload mules if the specified file is modified/touched ๐Ÿซฐ๐Ÿด
  • --touch-spoolers-reload โ€” reload spoolers if the specified file is modified/touched ๐Ÿซฐ
  • --touch-chain-reload โ€” trigger chain reload if the specified file is modified/touched ๐Ÿซฐโ›“๏ธ
  • --touch-logrotate โ€” trigger logrotation if the specified file is modified/touched ๐Ÿซฐ๐Ÿ“œ
  • --touch-logreopen โ€” trigger log reopen if the specified file is modified/touched ๐Ÿซฐ๐Ÿ“œ
  • --touch-exec โ€” run command when the specified file is modified/touched โ€” syntax: file command ๐Ÿซฐ
  • --touch-signal โ€” signal when the specified file is modified/touched โ€” syntax: file signal ๐Ÿซฐ
  • --fs-reload โ€” graceful reload when the specified filesystem object is modified ๐ŸŒธ๐Ÿ”„
  • --fs-brutal-reload โ€” brutal reload when the specified filesystem object is modified ๐Ÿ’€๐Ÿ”„
  • --fs-signal โ€” raise a uwsgi signal when the specified filesystem object is modified โ€” syntax: file signal ๐Ÿซฐ
  • --check-mountpoint โ€” if a filesystem is no longer reachable, this straight up destroys the instance. lowkey iconic for reliable Fuse management ๐Ÿ”ฅ
  • --mountpoint-check โ€” same girl as --check-mountpoint: filesystem gone โ†’ instance destroyed. for reliable Fuse management, periodt.
  • --check-mount โ€” yep, another twin: if a filesystem is no more reachable, the instance gets destroyed. reliable Fuse management stays winning โœจ
  • --mount-check โ€” bestie it's the fourth alias of the same thing: destroy the instance when a filesystem is no more reachable. reliable Fuse management, no cap.
  • --propagate-touch โ€” over-engineering option for systems with flaky signal management ๐Ÿซ  (the devs said it themselves, I'm just the messenger)
  • --limit-post โ€” limit request body. keep those bodies in check ๐Ÿ’…
  • --no-orphans โ€” automatically kills workers if the master dies.
โš ๏ธ heads up bestie, this one can be dangerous for availability. know what you're doing before you turn it on.
  • --prio โ€” set processes/threads priority.
  • --cpu-affinity โ€” set cpu affinity. pin your babies to the cores they deserve ๐ŸŒธ
  • --post-buffering โ€” set the size in bytes after which it'll buffer to disk instead of memory.
  • --post-buffering-bufsize โ€” set the buffer size for read() in post buffering mode.
  • --body-read-warning โ€” sets how much memory allocation (in megabytes) is allowed for a request body before it starts printing a warning ๐Ÿ“ข
  • --upload-progress โ€” enables creation of .json files in the specified directory while a file upload is happening. watching it in real time, we love to see it.
  • --no-default-app โ€” do not fallback to default app.
  • --manage-script-name โ€” automatically rewrite SCRIPT_NAME and PATH_INFO.
  • --ignore-script-name โ€” ignore SCRIPT_NAME.
  • --catch-exceptions โ€” report exception as http output.
๐Ÿ™ˆ discouraged!! use only for testing, bestie, I'm begging.
  • --reload-on-exception โ€” reload a worker when an exception is raised. she's dramatic, she resets ๐Ÿ’…
  • --reload-on-exception-type โ€” reload a worker when a specific exception type is raised.
  • --reload-on-exception-value โ€” reload a worker when a specific exception value is raised.
  • --reload-on-exception-repr โ€” reload a worker when a specific exception type+value (language-specific) is raised.
  • --exception-handler โ€” add an exception handler.

  • --enable-metrics โ€” enable metrics subsystem. numbers era ๐Ÿ“Š
  • --metric โ€” add a custom metric.
  • --metric-threshold โ€” add a metric threshold/alarm.
  • --metric-alarm โ€” add a metric threshold/alarm.
  • --alarm-metric โ€” add a metric threshold/alarm.
  • --metrics-dir โ€” export metrics as text files to the specified directory ๐Ÿ—‚๏ธ
  • --metrics-dir-restore โ€” restore last value taken from the metrics dir.
  • --metric-dir โ€” export metrics as text files to the specified directory.
  • --metric-dir-restore โ€” restore last value taken from the metrics dir.
  • --metrics-no-cores โ€” disable generation of cores-related metrics.
  • --udp โ€” run the udp server on the specified address.
  • --stats โ€” enable the stats server on the specified address ๐Ÿ‘‘
  • --stats-server โ€” enable the stats server on the specified address.
  • --stats-http โ€” prefix stats server json output with http headers.
  • --stats-minified โ€” minify statistics json output.
  • --stats-min โ€” minify statistics json output.
  • --stats-push โ€” push the stats json to the specified destination ๐Ÿ“ค
  • --stats-pusher-default-freq โ€” set the default frequency of stats pushers.
  • --stats-pushers-default-freq โ€” set the default frequency of stats pushers.
  • --stats-no-cores โ€” disable generation of cores-related stats.
  • --stats-no-metrics โ€” do not include metrics in stats output.
  • --multicast โ€” subscribe to specified multicast group.
  • --multicast-ttl โ€” set multicast ttl.
  • --multicast-loop โ€” set multicast loop (default 1).
  • --master-fifo โ€” enable the master fifo.
  • --notify-socket โ€” enable the notification socket ๐Ÿ””
  • --subscription-notify-socket โ€” set the notification socket for subscriptions.

legion section, bestie, get comfy ๐Ÿงš

  • --legion โ€” became a member of a legion.
  • --legion-mcast โ€” became a member of a legion (shortcut for multicast).
  • --legion-node โ€” add a node to a legion.
  • --legion-freq โ€” set the frequency of legion packets.
  • --legion-tolerance โ€” set the tolerance of legion subsystem.
  • --legion-death-on-lord-error โ€” declare itself as a dead node for the specified amount of seconds if one of the lord hooks fails ๐Ÿ’€
  • --legion-skew-tolerance โ€” set the clock skew tolerance of legion subsystem (default 30 seconds).
  • --legion-lord โ€” action to call on Lord election.
  • --legion-unlord โ€” action to call on Lord dismiss.
  • --legion-setup โ€” action to call on legion setup.
  • --legion-death โ€” action to call on legion death (shutdown of the instance).
  • --legion-join โ€” action to call on legion join (first time quorum is reached).
  • --legion-node-joined โ€” action to call on new node joining legion.
  • --legion-node-left โ€” action to call node leaving legion.
  • --legion-quorum โ€” set the quorum of a legion.
  • --legion-scroll โ€” set the scroll of a legion.
  • --legion-scroll-max-size โ€” set max size of legion scroll buffer.
  • --legion-scroll-list-max-size โ€” set max size of legion scroll list buffer.
  • --subscriptions-sign-check โ€” set digest algorithm and certificate directory for secured subscription system ๐Ÿ”
  • --subscriptions-sign-check-tolerance โ€” set the maximum tolerance (in seconds) of clock skew for secured subscription system.
  • --subscriptions-sign-skip-uid โ€” skip signature check for the specified uid when using unix sockets credentials.
  • --subscriptions-credentials-check โ€” add a directory to search for subscriptions key credentials.
  • --subscriptions-use-credentials โ€” enable management of SCM_CREDENTIALS in subscriptions UNIX sockets.
  • --subscription-algo โ€” set load balancing algorithm for the subscription system.
  • --subscription-dotsplit โ€” try to fallback to the next part (dot based) in subscription key.
  • --subscribe-to โ€” subscribe to the specified subscription server.
  • --st โ€” subscribe to the specified subscription server.
  • --subscribe โ€” subscribe to the specified subscription server.
  • --subscribe2 โ€” subscribe to the specified subscription server using advanced keyval syntax.
  • --subscribe-freq โ€” send subscription announce at the specified interval.
  • --subscription-tolerance โ€” set tolerance for subscription servers.
  • --unsubscribe-on-graceful-reload โ€” force unsubscribe request even during graceful reload.
  • --start-unsubscribed โ€” configure subscriptions but do not send them (useful with master fifo).
  • --subscribe-with-modifier1 โ€” force the specififed modifier1 when subscribing. (yes, that typo is canon, I don't make the rules ๐Ÿ’€)
  • --snmp โ€” enable the embedded snmp server.
  • --snmp-community โ€” set the snmp community string.

ssl time, bestie, be careful in here ๐ŸŒˆ

  • --ssl-verbose โ€” be verbose about SSL errors. spill the tea, TLS edition.
  • --ssl-verify-depth โ€” set maximum certificate verification depth.
  • --sni โ€” add an SNI-governed SSL context.
  • --sni-dir โ€” check for cert/key/client_ca file in the specified directory and create a sni/ssl context on demand โœจ
  • --sni-dir-ciphers โ€” set ssl ciphers for sni-dir option.
  • --ssl-enable3 โ€” enable SSLv3 (insecure).
  • --ssl-enable-sslv3 โ€” enable SSLv3 (insecure).
  • --ssl-enable-tlsv1 โ€” enable TLSv1 (insecure).
๐Ÿšจ bestie. insecure means insecure. don't do it unless you literally have to.
  • --ssl-option โ€” set a raw ssl option (numeric value).
  • --sni-regexp โ€” add an SNI-governed SSL context (the key is a regexp).
  • --ssl-tmp-dir โ€” store ssl-related temp files in the specified directory.
  • --check-interval โ€” set the interval (in seconds) of master checks.
  • --forkbomb-delay โ€” sleep for the specified number of seconds when a forkbomb is detected ๐Ÿ˜ญ
  • --binary-path โ€” force binary path.
  • --privileged-binary-patch โ€” patch the uwsgi binary with a new command (before privileges drop).
  • --unprivileged-binary-patch โ€” patch the uwsgi binary with a new command (after privileges drop).
  • --privileged-binary-patch-arg โ€” patch the uwsgi binary with a new command and arguments (before privileges drop).
  • --unprivileged-binary-patch-arg โ€” patch the uwsgi binary with a new command and arguments (after privileges drop).
  • --async โ€” enable async mode with specified cores โšก
  • --max-fd โ€” set maximum number of file descriptors (requires root privileges).
  • --logto โ€” set logfile/udp address.
  • --logto2 โ€” log to specified file or udp address after privileges drop.
  • --log-format โ€” set advanced format for request logging.
  • --logformat โ€” set advanced format for request logging.
  • --logformat-strftime โ€” apply strftime to logformat output.
  • --log-format-strftime โ€” apply strftime to logformat output.
  • --logfile-chown โ€” chown logfiles.
  • --logfile-chmod โ€” chmod logfiles.
  • --log-syslog โ€” log to syslog.
  • --log-socket โ€” send logs to the specified socket.
  • --req-logger โ€” set/append a request logger.
  • --logger-req โ€” set/append a request logger.
  • --logger โ€” set/append a logger.
  • --logger-list โ€” list enabled loggers.
  • --loggers-list โ€” list enabled loggers.
  • --threaded-logger โ€” offload log writing to a thread.
  • --log-encoder โ€” add an item in the log encoder chain.
  • --log-req-encoder โ€” add an item in the log req encoder chain.
  • --log-drain โ€” drain (do not show) log lines matching the specified regexp ๐Ÿšซ
  • --log-filter โ€” show only log lines matching the specified regexp.
  • --log-route โ€” log to the specified named logger if regexp applied on logline matches.
  • --log-req-route โ€” log requests to the specified named logger if regexp applied on logline matches.
  • --use-abort โ€” call abort() on segfault/fpe, could be useful for generating a core dump ๐Ÿ’€
  • --alarm โ€” create a new alarm, syntax: <alarm> <plugin:args> โฐ
  • --alarm-cheap โ€” use main alarm thread rather than create dedicated threads for curl-based alarms.
  • --alarm-freq โ€” tune the anti-loop alarm system (default 3 seconds).
  • --alarm-fd โ€” raise the specified alarm when an fd is read for read (by default it reads 1 byte, set 8 for eventfd).
  • --alarm-segfault โ€” raise the specified alarm when the segmentation fault handler is executed.
  • --segfault-alarm โ€” raise the specified alarm when the segmentation fault handler gets executed ๐Ÿ’€ (yes bestie, segfaults have a whole alarm system, iconic)
  • --alarm-backlog โ€” raise the specified alarm when the socket backlog queue is full
  • --backlog-alarm โ€” raise the specified alarm when the socket backlog queue is full
  • --lq-alarm โ€” raise the specified alarm when the socket backlog queue is full
  • --alarm-lq โ€” raise the specified alarm when the socket backlog queue is full
  • --alarm-listen-queue โ€” raise the specified alarm when the socket backlog queue is full
  • --listen-queue-alarm โ€” raise the specified alarm when the socket backlog queue is full
okay so that's SIX whole spellings of the same listen-queue alarm thing. no cap. they're all valid, pick whichever one your brain likes best ๐Ÿซถ
  • --log-alarm โ€” raise the specified alarm when a log line matches the specified regexp, syntax: <alarm>[,alarm...] <regexp>
  • --alarm-log โ€” raise the specified alarm when a log line matches the specified regexp, syntax: <alarm>[,alarm...] <regexp>
  • --not-log-alarm โ€” skip the specified alarm when a log line matches the specified regexp, syntax: <alarm>[,alarm...] <regexp>
  • --not-alarm-log โ€” skip the specified alarm when a log line matches the specified regexp, syntax: <alarm>[,alarm...] <regexp>
  • --alarm-list โ€” list enabled alarms โœจ
  • --alarms-list โ€” list enabled alarms
  • --alarm-msg-size โ€” set the max size of an alarm message (default 8192)

๐ŸŽ€ LOGGING ERA ๐ŸŽ€

  • --log-master โ€” delegate logging to master process, giving main character energy to the master
  • --log-master-bufsize โ€” set the buffer size for the master logger. bigger log messages will be truncated (sorry babe, they get cut off ๐Ÿ’…)
  • --log-master-stream โ€” create the master logpipe as SOCK_STREAM
  • --log-master-req-stream โ€” create the master requests logpipe as SOCK_STREAM
  • --log-reopen โ€” reopen log after reload
  • --log-truncate โ€” truncate log on startup
  • --log-maxsize โ€” set maximum logfile size
  • --log-backupname โ€” set logfile name after rotation
  • --logdate โ€” prefix logs with date or a strftime string
  • --log-date โ€” prefix logs with date or a strftime string
  • --log-prefix โ€” prefix logs with a string
  • --log-zero โ€” log responses without body
  • --log-slow โ€” log requests slower than the specified number of milliseconds ๐Ÿข
  • --log-4xx โ€” log requests with a 4xx response
  • --log-5xx โ€” log requests with a 5xx response
  • --log-big โ€” log requestes bigger than the specified size (yes, the typo is canon, we don't fix it ๐Ÿ™ˆ)
  • --log-sendfile โ€” log sendfile requests
  • --log-ioerror โ€” log requests with io errors
  • --log-micros โ€” report response time in microseconds instead of milliseconds
  • --log-x-forwarded-for โ€” use the ip from X-Forwarded-For header instead of REMOTE_ADDR
  • --master-as-root โ€” leave master process running as root
  • --drop-after-init โ€” run privileges drop after plugin initialization, superseded by drop-after-apps
  • --drop-after-apps โ€” run privileges drop after apps loading, superseded by master-as-root
  • --force-cwd โ€” force the initial working directory to the specified value
  • --binsh โ€” override /bin/sh (used by exec hooks, it always fallback to /bin/sh)
  • --chdir โ€” chdir to specified directory before apps loading
  • --chdir2 โ€” chdir to specified directory after apps loading
  • --lazy โ€” set lazy mode (load apps in workers instead of master)
  • --lazy-apps โ€” load apps in each worker instead of the master
  • --cheap โ€” set cheap mode (spawn workers only after the first request)
  • --cheaper โ€” set cheaper mode (adaptive process spawning)
  • --cheaper-initial โ€” set the initial number of processes to spawn in cheaper mode
  • --cheaper-algo โ€” choose to algorithm used for adaptive process spawning
  • --cheaper-step โ€” number of additional processes to spawn at each overload
  • --cheaper-overload โ€” increase workers after specified overload
  • --cheaper-algo-list โ€” list enabled cheapers algorithms
  • --cheaper-algos-list โ€” list enabled cheapers algorithms
  • --cheaper-list โ€” list enabled cheapers algorithms
  • --cheaper-rss-limit-soft โ€” don't spawn new workers if total resident memory usage of all workers is higher than this limit
  • --cheaper-rss-limit-hard โ€” if total workers resident memory usage is higher try to stop workers
  • --idle โ€” set idle mode (put uWSGI in cheap mode after inactivity) ๐Ÿ˜ด
  • --die-on-idle โ€” shutdown uWSGI when idle
  • --mount โ€” load application under mountpoint
  • --worker-mount โ€” load application under mountpoint in the specified worker or after workers spawn
  • --threads โ€” run each worker in prethreaded mode with the specified number of threads
  • --thread-stacksize โ€” set threads stacksize
  • --threads-stacksize โ€” set threads stacksize
  • --thread-stack-size โ€” set threads stacksize
  • --threads-stack-size โ€” set threads stacksize
  • --vhost โ€” enable virtualhosting mode (based on SERVER_NAME variable)
  • --vhost-host โ€” enable virtualhosting mode (based on HTTP_HOST variable)

๐ŸŒˆ ROUTING SUPREMACY ๐ŸŒˆ

okay bestie, this is the part where uWSGI becomes a whole router. buckle up, there are a LOT of these and they're all gorgeous.

regular routes

  • --route โ€” add a route
  • --route-host โ€” add a route based on Host header
  • --route-uri โ€” add a route based on REQUEST_URI
  • --route-qs โ€” add a route based on QUERY_STRING
  • --route-remote-addr โ€” add a route based on REMOTE_ADDR
  • --route-user-agent โ€” add a route based on HTTP_USER_AGENT
  • --route-remote-user โ€” add a route based on REMOTE_USER
  • --route-referer โ€” add a route based on HTTP_REFERER
  • --route-label โ€” add a routing label (for use with goto)
  • --route-if โ€” add a route based on condition
  • --route-if-not โ€” add a route based on condition (negate version)
  • --route-run โ€” always run the specified route action

final routes (the last word, periodt)

  • --final-route โ€” add a final route
  • --final-route-status โ€” add a final route for the specified status
  • --final-route-host โ€” add a final route based on Host header
  • --final-route-uri โ€” add a final route based on REQUEST_URI
  • --final-route-qs โ€” add a final route based on QUERY_STRING
  • --final-route-remote-addr โ€” add a final route based on REMOTE_ADDR
  • --final-route-user-agent โ€” add a final route based on HTTP_USER_AGENT
  • --final-route-remote-user โ€” add a final route based on REMOTE_USER
  • --final-route-referer โ€” add a final route based on HTTP_REFERER
  • --final-route-label โ€” add a final routing label (for use with goto)
  • --final-route-if โ€” add a final route based on condition
  • --final-route-if-not โ€” add a final route based on condition (negate version)
  • --final-route-run โ€” always run the specified final route action

error routes (for when things are giving chaos ๐Ÿ˜ญ)

  • --error-route โ€” add an error route
  • --error-route-status โ€” add an error route for the specified status
  • --error-route-host โ€” add an error route based on Host header
  • --error-route-uri โ€” add an error route based on REQUEST_URI
  • --error-route-qs โ€” add an error route based on QUERY_STRING
  • --error-route-remote-addr โ€” add an error route based on REMOTE_ADDR
  • --error-route-user-agent โ€” add an error route based on HTTP_USER_AGENT
  • --error-route-remote-user โ€” add an error route based on REMOTE_USER
  • --error-route-referer โ€” add an error route based on HTTP_REFERER
  • --error-route-label โ€” add an error routing label (for use with goto)
  • --error-route-if โ€” add an error route based on condition
  • --error-route-if-not โ€” add an error route based on condition (negate version)
  • --error-route-run โ€” always run the specified error route action

response routes (the aftercare ๐Ÿ’–)

  • --response-route โ€” add a response route
  • --response-route-status โ€” add a response route for the specified status
  • --response-route-host โ€” add a response route based on Host header
  • --response-route-uri โ€” add a response route based on REQUEST_URI
  • --response-route-qs โ€” add a response route based on QUERY_STRING
  • --response-route-remote-addr โ€” add a response route based on REMOTE_ADDR
  • --response-route-user-agent โ€” add a response route based on HTTP_USER_AGENT
  • --response-route-remote-user โ€” add a response route based on REMOTE_USER
  • --response-route-referer โ€” add a response route based on HTTP_REFERER
  • --response-route-label โ€” add a response routing label (for use with goto)
  • --response-route-if โ€” add a response route based on condition
  • --response-route-if-not โ€” add a response route based on condition (negate version)
  • --response-route-run โ€” always run the specified response route action
  • --router-list โ€” list enabled routers ๐Ÿ‘‘
  • --routers-list โ€” list enabled routers
  • --error-page-403 โ€” add an error page (html) for managed 403 response
  • --error-page-404 โ€” add an error page (html) for managed 404 response
  • --error-page-500 โ€” add an error page (html) for managed 500 response

๐Ÿฆ‹ WEBSOCKETS & MISC ๐ŸŒธ

  • --websockets-ping-freq โ€” set the frequency (in seconds) of websockets automatic ping packets
  • --websocket-ping-freq โ€” set the frequency (in seconds) of websockets automatic ping packets
  • --websockets-pong-tolerance โ€” set the tolerance (in seconds) of websockets ping/pong subsystem
  • --websocket-pong-tolerance โ€” set the tolerance (in seconds) of websockets ping/pong subsystem
  • --websockets-max-size โ€” set the max allowed size of websocket messages (in Kbytes, default 1024)
  • --websocket-max-size โ€” set the max allowed size of websocket messages (in Kbytes, default 1024)
  • --chunked-input-limit โ€” set the max size of a chunked input part (default 1MB, in bytes)
  • --chunked-input-timeout โ€” set default timeout for chunked input
  • --clock โ€” set a clock source โฐ
  • --clock-list โ€” list enabled clocks
  • --clocks-list โ€” list enabled clocks
  • --add-header โ€” automatically add HTTP headers to response
  • --rem-header โ€” automatically remove specified HTTP header from the response
  • --del-header โ€” automatically remove specified HTTP header from the response
  • --collect-header โ€” store the specified response header in a request var (syntax: header var)
ngl the header trio is giving "pick your fighter" energy โ€” --rem-header and --del-header are literally the same thing, so go with whichever one your fingers type faster ๐Ÿ’…

okay bestie, part 6, the final stretch ๐Ÿ the options just keep on coming and honestly? we love a thorough queen. keep your snack, we're finishing this ๐Ÿ’–

  • --response-header-collect โ€” stash the specified response header into a request var (syntax: header var) โœจ
  • --pull-header โ€” same energy as the one above, except it also rips the header out of the response entirely (syntax: header var) ๐Ÿ’…
  • --check-static โ€” check for static files in the directory you point at
  • --check-static-docroot โ€” check for static files in the requested DOCUMENT_ROOT
  • --static-check โ€” check for static files in the specified directory (yes it's the same idea, it's just got a different name, iykyk)
  • --static-map โ€” map a mountpoint to a static directory (or a file)
  • --static-map2 โ€” like --static-map but it completely appends the requested resource onto the docroot
  • --static-skip-ext โ€” skip the specified extension when doing staticfile checks
  • --static-index โ€” if a directory gets requested, go search for the file you specified
  • --static-safe โ€” skip security checks when the file lives under the specified path
  • --static-cache-paths โ€” drop resolved paths into the uWSGI cache for however many seconds you say
  • --static-cache-paths-name โ€” use the specified cache for those static paths
  • --mimefile โ€” set the mime types file path (default /etc/mime.types)
  • --mime-file โ€” set the mime types file path (default /etc/mime.types) ๐ŸŽ€ same thing, twin energy
  • --static-expires-type โ€” set the Expires header based on content type
  • --static-expires-type-mtime โ€” set the Expires header based on content type and the file's mtime
  • --static-expires โ€” set the Expires header based on a filename regexp
  • --static-expires-mtime โ€” set the Expires header based on a filename regexp and the file's mtime
  • --static-expires-uri โ€” set the Expires header based on a REQUEST_URI regexp
  • --static-expires-uri-mtime โ€” set the Expires header based on a REQUEST_URI regexp and the file's mtime
  • --static-expires-path-info โ€” set the Expires header based on a PATH_INFO regexp
  • --static-expires-path-info-mtime โ€” set the Expires header based on a PATH_INFO regexp and the file's mtime

caching era ๐Ÿฆ‹ now the gzip girlypops:

  • --static-gzip โ€” if the regexp you supplied matches the static file translation, it goes looking for a gzip version
  • --static-gzip-all โ€” check for a gzip version of every requested static file, no regexp required
  • --static-gzip-dir โ€” check for a gzip version of all requested static files in the specified dir/prefix
  • --static-gzip-prefix โ€” check for a gzip version of all requested static files in the specified dir/prefix (same vibe, different name)
  • --static-gzip-ext โ€” check for a gzip version of all requested static files with the specified ext/suffix
  • --static-gzip-suffix โ€” check for a gzip version of all requested static files with the specified ext/suffix

  • --honour-range โ€” turn on support for the HTTP Range header
  • --offload-threads โ€” set how many offload threads to spawn (per-worker, default 0)
  • --offload-thread โ€” set how many offload threads to spawn (per-worker, default 0) ๐ŸŒธ
  • --file-serve-mode โ€” set the static file serving mode
  • --fileserve-mode โ€” set the static file serving mode (yep, alias, we love a duo)
  • --disable-sendfile โ€” disable sendfile() and instead rely on the very boring read()/write() ๐Ÿ˜ญ
  • --check-cache โ€” check for response data in the specified cache (leave it empty for the default cache)
  • --close-on-exec โ€” set close-on-exec on connection sockets (could be required for spawning processes in requests)
  • --close-on-exec2 โ€” set close-on-exec on server sockets (could be required for spawning processes in requests)
  • --mode โ€” set uWSGI custom mode
  • --env โ€” set an environment variable
  • --envdir โ€” load a daemontools compatible envdir
  • --early-envdir โ€” load a daemontools compatible envdir ASAP (main character urgency)
  • --unenv โ€” unset an environment variable
  • --vacuum โ€” try to remove all of the generated file/sockets ๐Ÿงน
  • --file-write โ€” write the specified content to the specified file (syntax: file=value) before privileges drop
  • --cgroup โ€” put the processes in the specified cgroup
  • --cgroup-opt โ€” set a value in the specified cgroup option
  • --cgroup-dir-mode โ€” set permission for the cgroup directory (default is 700)
  • --namespace โ€” run in a new namespace under the specified rootfs
  • --namespace-keep-mount โ€” keep the specified mountpoint in your namespace
  • --ns โ€” run in a new namespace under the specified rootfs
  • --namespace-net โ€” add network namespace
  • --ns-net โ€” add network namespace
  • --enable-proxy-protocol โ€” enable PROXY1 protocol support (only for http parsers)
  • --reuse-port โ€” enable the REUSE_PORT flag on socket (BSD only)
  • --tcp-fast-open โ€” enable the TCP_FASTOPEN flag on TCP sockets with the qlen value you specify
  • --tcp-fastopen โ€” enable the TCP_FASTOPEN flag on TCP sockets with the qlen value you specify
  • --tcp-fast-open-client โ€” use sendto(..., MSG_FASTOPEN, ...) instead of connect() if it's supported
  • --tcp-fastopen-client โ€” use sendto(..., MSG_FASTOPEN, ...) instead of connect() if it's supported

zerg and cron section, hold my matcha ๐Ÿ“

  • --zerg โ€” attach to a zerg server
  • --zerg-fallback โ€” fall back to normal sockets if the zerg server isn't available
  • --zerg-server โ€” enable the zerg server on the specified UNIX socket
  • --cron โ€” add a cron task
  • --cron2 โ€” add a cron task (key=val syntax)
  • --unique-cron โ€” add a unique cron task
  • --cron-harakiri โ€” set the maximum time (in seconds) we wait for a cron command to complete
  • --legion-cron โ€” add a cron task that only runs when the instance is a lord of the specified legion ๐Ÿ‘‘
  • --cron-legion โ€” add a cron task that only runs when the instance is a lord of the specified legion
  • --unique-legion-cron โ€” add a unique cron task that only runs when the instance is a lord of the specified legion
  • --unique-cron-legion โ€” add a unique cron task that only runs when the instance is a lord of the specified legion

  • --loop โ€” select the uWSGI loop engine
  • --loop-list โ€” list enabled loop engines
  • --loops-list โ€” list enabled loop engines
  • --worker-exec โ€” run the specified command as worker
  • --worker-exec2 โ€” run the specified command as worker (after the post_fork hook)
  • --attach-daemon โ€” attach a command/daemon to the master process (the command has to not go in background) ๐Ÿ™ˆ
  • --attach-control-daemon โ€” attach a command/daemon to the master process (the command has to not go in background), and when the daemon dies, the master dies too ๐Ÿ’€
  • --smart-attach-daemon โ€” attach a command/daemon to the master process, managed by a pidfile (the command has to daemonize)
  • --smart-attach-daemon2 โ€” attach a command/daemon to the master process, managed by a pidfile (the command has to NOT daemonize)
  • --legion-attach-daemon โ€” same as --attach-daemon but the daemon only runs on the legion lord node
  • --legion-smart-attach-daemon โ€” same as --smart-attach-daemon but the daemon only runs on the legion lord node
  • --legion-smart-attach-daemon2 โ€” same as --smart-attach-daemon2 but the daemon only runs on the legion lord node
  • --daemons-honour-stdin โ€” do not change the stdin of external daemons to /dev/null
  • --attach-daemon2 โ€” the attach-daemon keyval variant (supports smart modes too)

plugins o'clock ๐Ÿ’…

  • --plugins โ€” load uWSGI plugins
  • --plugin โ€” load uWSGI plugins
  • --need-plugins โ€” load uWSGI plugins (and exit on error)
  • --need-plugin โ€” load uWSGI plugins (and exit on error)
  • --plugins-dir โ€” add a directory to the uWSGI plugin search path
  • --plugin-dir โ€” add a directory to the uWSGI plugin search path
  • --plugins-list โ€” list enabled plugins
  • --plugin-list โ€” list enabled plugins
  • --autoload โ€” try to automatically load plugins when unknown options are found
  • --dlopen โ€” blindly load a shared library ๐Ÿซฃ
  • --allowed-modifiers โ€” comma separated list of allowed modifiers
  • --remap-modifier โ€” remap a request modifier from one id to another
  • --dump-options โ€” dump the full list of available options
  • --show-config โ€” show the current config reformatted as ini
  • --binary-append-data โ€” return the content of a resource to stdout for appending to a uwsgi binary (for data:// usage)
  • --print โ€” simple print
  • --iprint โ€” simple print (immediate version)
  • --exit โ€” force exit() of the instance
  • --cflags โ€” report uWSGI CFLAGS (useful for building external plugins)
  • --dot-h โ€” dump the uwsgi.h used for building the core (useful for building external plugins)
  • --config-py โ€” dump the uwsgiconfig.py used for building the core (useful for building external plugins)
  • --build-plugin โ€” build a uWSGI plugin for the current binary
  • --version โ€” print uWSGI version
  • --response-headers-limit โ€” set the response header maximum size (default: 64k)

and that's a wrap bestie ๐ŸŽ€ you made it through every single option and I'm so proud of you fr fr. this page is from uwsgi_rack_ruby30, version 2.0.20-debian, dated March 2022 โ€” go forth and slay your configs ๐Ÿ’–โœจ

๐Ÿ“ฆ where this page comes from