UWSGI_RACK_RUBY30(1)
๐ 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โ serializeaccept()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 onwrite()/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 withexec://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โ useclone()instead offork()passing the specifiedunshare()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--includeinstead 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--includeinstead 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 onSIGTERM. 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โ callwaitpid(-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 themax_worker_lifetimevalue 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 viaftok()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โ updatelast_modified_attimestamp 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 viainitgroups(). 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/nsas 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 anotherfork()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 beforeexec()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 beforeexec()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 beforeexec()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 beforeexec()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 forwait-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 forwait-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 forwait-for-interfaceโฑ๏ธ--wait-ifaceโ wait for the specified network interface to come up before running root hooks ๐--wait-iface-timeoutโ set the timeout forwait-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 forwait-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 forwait-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 specifiedfunction()beforeexec()ing the vassal ๐ง--call-as-vassal1โ call the specifiedfunction(char *)beforeexec()ing the vassal ๐ง--call-as-vassal3โ call the specifiedfunction(char *, uid_t, gid_t)beforeexec()ing the vassal ๐ง--call-as-emperorโ call the specifiedfunction()in the emperor after the vassal has been started ๐--call-as-emperor1โ call the specifiedfunction(char *)in the emperor after the vassal has been started ๐--call-as-emperor2โ call the specifiedfunction(char *, pid_t)in the emperor after the vassal has been started ๐--call-as-emperor4โ call the specifiedfunction(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โ setSO_SNDTIMEOโฑ๏ธ--socket-send-timeoutโ setSO_SNDTIMEOโฑ๏ธ--so-write-timeoutโ setSO_SNDTIMEOโฑ๏ธ--socket-write-timeoutโ setSO_SNDTIMEOโฑ๏ธ--socket-sndbufโ setSO_SNDBUF๐ค--socket-rcvbufโ setSO_RCVBUF๐ฅ--shutdown-socketsโ force callingshutdown()in addition toclose()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 forread()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.jsonfiles 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 rewriteSCRIPT_NAMEandPATH_INFO.--ignore-script-nameโ ignoreSCRIPT_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 (default1).--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 (default30seconds).--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 ofSCM_CREDENTIALSin 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 specififedmodifier1when 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 forcert/key/client_cafile in the specified directory and create a sni/ssl context on demand โจ--sni-dir-ciphersโ set ssl ciphers forsni-diroption.--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โ applystrftimetologformatoutput.--log-format-strftimeโ applystrftimetologformatoutput.--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โ callabort()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 (default3seconds).--alarm-fdโ raise the specified alarm when an fd is read for read (by default it reads1byte, set8for 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 (default8192)
๐ 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 asSOCK_STREAM--log-master-req-streamโ create the master requests logpipe asSOCK_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 astrftimestring--log-dateโ prefix logs with date or astrftimestring--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 a4xxresponse--log-5xxโ log requests with a5xxresponse--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 fromX-Forwarded-Forheader instead ofREMOTE_ADDR--master-as-rootโ leave master process running as root--drop-after-initโ run privileges drop after plugin initialization, superseded bydrop-after-apps--drop-after-appsโ run privileges drop after apps loading, superseded bymaster-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 onSERVER_NAMEvariable)--vhost-hostโ enable virtualhosting mode (based onHTTP_HOSTvariable)
๐ 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 onHostheader--route-uriโ add a route based onREQUEST_URI--route-qsโ add a route based onQUERY_STRING--route-remote-addrโ add a route based onREMOTE_ADDR--route-user-agentโ add a route based onHTTP_USER_AGENT--route-remote-userโ add a route based onREMOTE_USER--route-refererโ add a route based onHTTP_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 onHostheader--final-route-uriโ add a final route based onREQUEST_URI--final-route-qsโ add a final route based onQUERY_STRING--final-route-remote-addrโ add a final route based onREMOTE_ADDR--final-route-user-agentโ add a final route based onHTTP_USER_AGENT--final-route-remote-userโ add a final route based onREMOTE_USER--final-route-refererโ add a final route based onHTTP_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 onHostheader--error-route-uriโ add an error route based onREQUEST_URI--error-route-qsโ add an error route based onQUERY_STRING--error-route-remote-addrโ add an error route based onREMOTE_ADDR--error-route-user-agentโ add an error route based onHTTP_USER_AGENT--error-route-remote-userโ add an error route based onREMOTE_USER--error-route-refererโ add an error route based onHTTP_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 onHostheader--response-route-uriโ add a response route based onREQUEST_URI--response-route-qsโ add a response route based onQUERY_STRING--response-route-remote-addrโ add a response route based onREMOTE_ADDR--response-route-user-agentโ add a response route based onHTTP_USER_AGENT--response-route-remote-userโ add a response route based onREMOTE_USER--response-route-refererโ add a response route based onHTTP_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 managed403response--error-page-404โ add an error page (html) for managed404response--error-page-500โ add an error page (html) for managed500response
๐ฆ 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, default1024)--websocket-max-sizeโ set the max allowed size of websocket messages (in Kbytes, default1024)--chunked-input-limitโ set the max size of a chunked input part (default1MB, 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-headerand--del-headerare 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 requestedDOCUMENT_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-mapbut 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 theExpiresheader based on content type--static-expires-type-mtimeโ set theExpiresheader based on content type and the file's mtime--static-expiresโ set theExpiresheader based on a filename regexp--static-expires-mtimeโ set theExpiresheader based on a filename regexp and the file's mtime--static-expires-uriโ set theExpiresheader based on aREQUEST_URIregexp--static-expires-uri-mtimeโ set theExpiresheader based on aREQUEST_URIregexp and the file's mtime--static-expires-path-infoโ set theExpiresheader based on aPATH_INFOregexp--static-expires-path-info-mtimeโ set theExpiresheader based on aPATH_INFOregexp 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 HTTPRangeheader--offload-threadsโ set how many offload threads to spawn (per-worker, default0)--offload-threadโ set how many offload threads to spawn (per-worker, default0) ๐ธ--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โ disablesendfile()and instead rely on the very boringread()/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 is700)--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โ enablePROXY1protocol support (only for http parsers)--reuse-portโ enable theREUSE_PORTflag on socket (BSD only)--tcp-fast-openโ enable theTCP_FASTOPENflag on TCP sockets with the qlen value you specify--tcp-fastopenโ enable theTCP_FASTOPENflag on TCP sockets with the qlen value you specify--tcp-fast-open-clientโ usesendto(..., MSG_FASTOPEN, ...)instead ofconnect()if it's supported--tcp-fastopen-clientโ usesendto(..., MSG_FASTOPEN, ...)instead ofconnect()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=valsyntax)--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 thepost_forkhook)--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-daemonbut the daemon only runs on the legion lord node--legion-smart-attach-daemonโ same as--smart-attach-daemonbut the daemon only runs on the legion lord node--legion-smart-attach-daemon2โ same as--smart-attach-daemon2but 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 (fordata://usage)--printโ simple print--iprintโ simple print (immediate version)--exitโ forceexit()of the instance--cflagsโ report uWSGI CFLAGS (useful for building external plugins)--dot-hโ dump theuwsgi.hused for building the core (useful for building external plugins)--config-pyโ dump theuwsgiconfig.pyused 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
- ubuntu jammy: uwsgi-plugin-rack-ruby3.0 2.0.20-4 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms