UWSGI_PYTHON311(1)
โจ NAME โจ
uwsgi_python311 โ a fast (pure C), self-healing, developer-friendly WSGI server. bestie she is that girl. ๐
๐ฆ SYNOPSIS ๐ฆ
uwsgi-core-local [options...]
๐ DESCRIPTION ๐
okay so. this is uWSGI, but the Python 3.11 flavoured one, and the whole page is basically one giant list of options. no shade, that's just how she is. every flag below does exactly what it says, so grab a snack ๐ and let's go.
๐ sockets & protocols
-s,--socketโ bind to the specified UNIX/TCP socket using the default protocol ๐-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 ๐--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 the HTTP 1.1 (Keep-Alive) protocol โจ--https-socketโ bind to the specified UNIX/TCP socket using the 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 the FastCGI protocol--fastcgi-nph-socketโ bind to the specified UNIX/TCP socket using the FastCGI protocol (nph mode)--fastcgi-modifier1โ force the specified modifier1 when using the FastCGI protocol--fastcgi-modifier2โ force the specified modifier2 when using the FastCGI protocol--scgi-socketโ bind to the specified UNIX/TCP socket using the SCGI protocol--scgi-nph-socketโ bind to the specified UNIX/TCP socket using the SCGI protocol (nph mode)--scgi-modifier1โ force the specified modifier1 when using the SCGI protocol--scgi-modifier2โ force the specified modifier2 when using the SCGI protocol--raw-socketโ bind to the specified UNIX/TCP socket using the RAW protocol--raw-modifier1โ force the specified modifier1 when using the RAW protocol--raw-modifier2โ force the specified modifier2 when using the RAW protocol--puwsgi-socketโ bind to the specified UNIX/TCP socket using the persistent uwsgi protocol (puwsgi) ๐ซถ--protocolโ force the specified protocol for default sockets--socket-protocolโ force the specified protocol for default sockets--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)
๐ง workers, processes & harakiri
-p,--processesโ spawn the specified number of workers/processes ๐-p,--workersโ spawn the specified number of workers/processes ๐--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--no-harakiri-after-req-hookโ do not enable harakiri during after-request-hook--backtrace-depthโ set backtrace depth--mule-harakiriโ set harakiri timeout for mule tasks
๐ config & friends
-x,--xmlconfigโ load config from xml file-x,--xmlโ load config from xml file--configโ load configuration using the pluggable system ๐--fallback-configโ re-exec uwsgi with the specified config when exit code is1--strictโ enable strict mode (placeholder cannot be used) ๐จ--skip-zeroโ skip check of file descriptor0--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--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)
๐ opt logic (the if/for girlies)
--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 from1)--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--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--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--if-pluginโ (opt logic) check for plugin--if-not-pluginโ (opt logic) check for plugin--ifpluginโ (opt logic) check for plugin--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--endifโ (opt logic) end if--end-ifโ (opt logic) end if
๐ lists, errors & templates
--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)
๐ daemonize & instance control
-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
โญ tuning, buffers & memory
-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--chown-socketโ chown unix sockets--umaskโ set umask--freebindโ put socket in freebind mode--map-socketโ map sockets to specific workers
๐งต threads, names & the master
-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
๐ the Emperor
--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 (default3seconds) โฑ๏ธ--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
and bestie we are literally not even close to done, hold on because part 2 is right there and it's got even more ๐
--early-emperorโ spawn the emperor as soon as possibile โจ (yes, that's the manpage's own spelling, we keep it bestie, no cap)--emperor-broodlordโ run the emperor in BroodLord mode ๐ง (it's giving sci-fi villain, but make it config management)--emperor-throttleโ set the throttling level (in milliseconds) for vassals that are being bad ๐ค default is1000--emperor-max-throttleโ set the max throttling level (in milliseconds) for badly-behaved vassals, default is3 minutes๐--emperor-magic-execโ prefixes vassal config files withexec://if they have the executable bit set ๐ฅ lowkey magic fr--emperor-on-demand-extensionโ search for a text file (vassal name + extension) that contains the on demand socket name ๐ซถ--emperor-on-demand-extโ same thing, shorter name, search for that text file (vassal name + extension) holding the on demand socket name ๐--emperor-on-demand-directoryโ enable on demand mode, binding to the unix socket inside the specified directory, named like the vassal +.socket๐ธ--emperor-on-demand-dirโ the short twin: on demand mode, unix socket in the specified dir, named vassal +.socketโจ--emperor-on-demand-execโ use the output of the specified command as the on demand socket name (the vassal name gets passed as the only argument) ๐--emperor-extra-extensionโ allows the specified extension in the Emperor (the vassal will be called with--config) ๐--emperor-extra-extโ same energy, short version: allows that extension in the Emperor, vassal gets called with--config๐ฆ--emperor-no-blacklistโ disable the Emperor blacklisting subsystem ๐--emperor-use-cloneโ useclone()instead offork(), passing the specifiedunshare()flags ๐งฌ--emperor-graceful-shutdownโ use vassals graceful shutdown during ragnarok ๐ (yes, ragnarok, they said what they said)--emperor-capโ set vassals capability ๐ช--vassals-capโ set vassals capability (same flag, another alias, we love options) ๐ช--vassal-capโ set vassals capability, singular edition ๐ช--imperial-monitor-listโ list enabled imperial monitors ๐--imperial-monitors-listโ list enabled imperial monitors (plural, because why not) ๐--vassals-inheritโ add config templates to vassals config (uses--inherit) ๐ซถ--vassals-includeโ include config templates in vassals config (uses--includeinstead of--inherit) โจ--vassals-inherit-beforeโ add config templates to vassals config (uses--inherit, and parses before the vassal file) โญ--vassals-include-beforeโ include config templates in vassals config (uses--includeinstead of--inherit, and parses before the vassal file) โญ--vassals-start-hookโ run the specified command before each vassal starts ๐ฌ--vassals-stop-hookโ run the specified command after a vassal's death ๐--vassal-sosโ ask the emperor for reinforcement when overloaded ๐--vassal-sos-backlogโ ask the emperor for SOS if the backlog queue has more items than the value specified ๐--vassals-setโ automatically set the specified option (via--set) for every vassal ๐--vassal-setโ automatically set the specified option (via--set) for every vassal (singular spelling, same vibe) ๐--heartbeatโ announce healthiness to the emperor ๐--reload-mercyโ set the maximum time (in seconds) we wait for workers and other processes to die during reload/shutdown โณ--worker-reload-mercyโ set the maximum time (in seconds) a worker can take to reload/shutdown, default is60๐ฐ๏ธ--mule-reload-mercyโ set the maximum time (in seconds) a mule can take to reload/shutdown, default is60๐ด--exit-on-reloadโ force exit even if a reload is requested ๐ช--die-on-termโ exit instead of brutal reload onSIGTERM๐--force-gatewayโ force the spawn of the first registered gateway without a master ๐-h|--helpโ show this help ๐ซถ-h|--usageโ show this help (yes, again, it's the same letter, don't come for us) ๐ซถ--print-symโ print the content of the specified binary symbol ๐--print-symbolโ print the content of the specified binary symbol (longer name, same tea) ๐-r|--reaperโ callwaitpid(-1,...)after each request to get rid of zombies ๐ง-R|--max-requestsโ reload workers after the specified amount of managed requests ๐--min-worker-lifetimeโ number of seconds a worker must run before being reloaded, default is60โฑ๏ธ--max-worker-lifetimeโ reload workers after the specified amount of seconds, default is disabled โ--max-worker-lifetime-deltaโ add(worker_id * delta)seconds to themax_worker_lifetimevalue of each worker โ-z|--socket-timeoutโ set internal sockets timeout โฒ๏ธ--no-fd-passingโ disable file descriptor passing ๐ซ--locksโ create the specified number of shared locks ๐--lock-engineโ set the lock engine โ๏ธ--ftokโ set the ipcsem key viaftok()for avoiding duplicates ๐--persistent-ipcsemโ do not remove ipcsem's on shutdown ๐ซฅ-A|--sharedareaโ create a raw shared memory area of specified pages (note: it supports keyval too) ๐ง--safe-fdโ do not close the specified file descriptor ๐--fd-safeโ do not close the specified file descriptor (same thing, different order, iconic) ๐--cacheโ create a shared cache containing given elements ๐๏ธ--cache-blocksizeโ set cache blocksize ๐ฆ--cache-storeโ enable persistent cache to disk ๐พ--cache-store-syncโ set frequency of sync for persistent cache ๐--cache-no-expireโ disable auto sweep of expired items ๐งน--cache-expire-freqโ set the frequency of cache sweeper scans, default3 secondsโฐ--cache-report-freed-itemsโ constantly report the cache item freed by the sweeper (use only for debug) ๐--cache-udp-serverโ bind the cache udp server (used only for set/update/delete) to the specified socket ๐ก--cache-udp-nodeโ send cache update/deletion to the specified cache udp server ๐ค--cache-syncโ copy the whole content of another uWSGI cache server on server startup ๐ฅ--cache-use-last-modifiedโ updatelast_modified_attimestamp on every cache item modification, default is disabled ๐--add-cache-itemโ add an item in the cache โ--load-file-in-cacheโ load a static file in the cache ๐--load-file-in-cache-gzipโ load a static file in the cache with gzip compression ๐๏ธ--cache2โ create a new generation shared cache (keyval syntax) โจ--queueโ enable shared queue ๐ถโ๏ธ--queue-blocksizeโ set queue blocksize ๐ฆ--queue-storeโ enable persistent queue to disk ๐พ--queue-store-syncโ set frequency of sync for persistent queue ๐-Q|--spoolerโ run a spooler on the specified directory ๐งต--spooler-externalโ map spoolers requests to a spooler directory managed by an external instance ๐--spooler-orderedโ try to order the execution of spooler tasks ๐--spooler-chdirโchdir()to specified directory before each spooler task ๐--spooler-processesโ set the number of processes for spoolers ๐ฅ--spooler-quietโ do not be verbose with spooler tasks ๐คซ--spooler-max-tasksโ set the maximum number of tasks to run before recycling a spooler โป๏ธ--spooler-harakiriโ set harakiri timeout for spooler tasks ๐ก๏ธ--spooler-frequencyโ set spooler frequency ๐ถ--spooler-freqโ set spooler frequency (short twin) ๐ถ--muleโ add a mule ๐ด--mulesโ add the specified number of mules ๐ด๐ด--farmโ add a mule farm ๐--mule-msg-sizeโ set mule message buffer size ๐จ--signalโ send a uwsgi signal to a server ๐ถ--signal-bufsizeโ set buffer size for signal queue ๐ฅ--signals-bufsizeโ set buffer size for signal queue (plural, same thing) ๐ฅ--signal-timerโ add a timer (syntax:<signal> <seconds>) โฐ--timerโ add a timer (syntax:<signal> <seconds>) โฐ--signal-rbtimerโ add a redblack timer (syntax:<signal> <seconds>) ๐ณ--rbtimerโ add a redblack timer (syntax:<signal> <seconds>) ๐ณ--rpc-maxโ maximum number of rpc slots, default:64๐-L|--disable-loggingโ disable request logging ๐ค--flockโ lock the specified file before starting, exit if locked ๐--flock-waitโ lock the specified file before starting, wait if locked โณ--flock2โ lock the specified file after logging/daemon setup, exit if locked ๐--flock-wait2โ lock the specified file after logging/daemon setup, wait if locked โณ--pidfileโ create pidfile (before privileges drop) ๐ชช--pidfile2โ create pidfile (after privileges drop) ๐ชช--safe-pidfileโ create safe pidfile (before privileges drop) ๐--safe-pidfile2โ create safe pidfile (after privileges drop) ๐--chrootโchroot()to the specified directory ๐ฆ--pivot-rootโpivot_root()to the specified directories (new_rootandput_oldmust be separated with a space) ๐--pivot_rootโpivot_root()to the specified directories (new_rootandput_oldmust be separated with a space) โ underscore edition ๐--uidโsetuidto the specified user/uid ๐--gidโsetgidto the specified group/gid ๐--add-gidโ add the specified group id to the process credentials โ--immediate-uidโsetuidto the specified user/uid IMMEDIATELY โก--immediate-gidโsetgidto the specified group/gid IMMEDIATELY โก--no-initgroupsโ disable additional groups set viainitgroups()๐ซ--capโ set process capability ๐ช--unshareโunshare()part of the processes and put it in a new namespace ๐ช--unshare2โunshare()part of the processes and put it in a new namespace, but after rootfs change ๐ช--setns-socketโ expose a unix socket returning namespace fds from/proc/self/ns๐--setns-socket-skipโ skip the specified entry when sending setns file descriptors โญ๏ธ--setns-skipโ skip the specified entry when sending setns file descriptors (short version) โญ๏ธ--setnsโ join a namespace created by an external uWSGI instance ๐ช--setns-preopenโ open/proc/self/nsas soon as possible and cache fds ๐๏ธ--jailedโ mark the instance as jailed (force the execution ofpost_jailhooks) ๐--reforkโfork()again after privileges drop. Useful for jailing systems ๐--re-forkโfork()again after privileges drop. Useful for jailing systems (hyphen edition) ๐--refork-as-rootโfork()again before privileges drop. Useful for jailing systems ๐--re-fork-as-rootโfork()again before privileges drop. Useful for jailing systems (hyphen edition, still iconic) ๐
โจ OPTIONS โจ
okay bestie we're in the thick of it now, this is the options list and it is long. hydrate. stretch. let's go ๐
๐ช hooks (aka the "do a thing at this exact moment" squad)
every single one of these wants you to hand it a hook โ you pick the moment, it runs your hook there. no cap.
--refork-post-jailโfork()again after jailing. useful for jailing systems ๐--re-fork-post-jailโfork()again after jailing. useful for jailing systems (yes bestie it's the same thing, it's an alias, we love a spare key ๐)--hook-asapโ run the specified hook as soon as possible โก--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)--hook-accepting1-onceโ run the specified hook after the first worker enters the accepting phase (once per instance)--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
๐ exec โ same moments, but it's a command this time
--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
๐พ mount โ filesystems, but make it scheduled
--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
๐๏ธ umount โ the un-mounting of it all
--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 โ bestie we are NOT starting until this thing exists
๐ network interfaces (four whole names for the same vibe, iconic)
--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--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
๐ filesystem stuff
--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
๐ sockets
--wait-for-socketโ wait for the specified socket to be ready before loading apps--wait-for-socket-timeoutโ set the timeout forwait-for-socket
๐ call โ like exec but it's a function, and it is picky about signatures
some of these care about the exact shape of the function you hand them. the ones with a number at the end? that's the arg count, iykyk. don't mix them up bestie ๐
--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 files โ feed me, bestie
--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
โ๏ธ mode + weight + the socket behaviour knobs
--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
๐ง limits, memory, and the reload machinery
--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 ๐
ngl "brutal" is doing a lot of heavy lifting in that name and it means what it says. read the label before you reach for it.
--ksmโ enable Linux KSM--pcre-jitโ enable pcre jit (if available)--never-swapโ lock all memory pages avoiding swapping
๐ touch-* โ the "poke a file, get a reaction" collection
--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-* โ filesystem object watches, the glow-up edition
--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)
and we are not done bestie, keep scrolling, there's more coming ๐
--check-mountpointโ destroys the instance if a filesystem is no longer reachable ๐ (handy if you want reliable Fuse management, fr fr)--mountpoint-checkโ yeah same thing bestie: instance gets destroyed when a filesystem stops being reachable (good for reliable Fuse management) โจ--check-mountโ yep, again: destroy the instance if a filesystem is no more reachable (reliable Fuse management vibes ๐ซถ)--mount-checkโ the fourth twin ๐ destroy the instance if a filesystem is no more reachable (useful for reliable Fuse management)--propagate-touchโ over-engineering option for systems with flaky signal management ๐ญ like it's giving "we fixed the thing by adding more thing"--limit-postโ limit the request body ๐--no-orphansโ automatically kills workers if the master dies ๐ชฆ
โ ๏ธ bestie this one can be dangerous for availability, so know what you're doing before you turn it on
--prioโ set processes/threads priority ๐๏ธ--cpu-affinityโ set cpu affinity ๐งฒ--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โ set the amount of allowed memory allocation (in megabytes) for the request body before it starts printing a warning ๐--upload-progressโ enable creation of.jsonfiles in the specified directory during a file upload ๐--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 โ literally it says so, don't @ me
--reload-on-exceptionโ reload a worker when an exception is raised ๐--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 ๐--metricโ add a custom metric โจ--metric-thresholdโ add a metric threshold/alarm ๐จ--metric-alarmโ add a metric threshold/alarm (same energy, different name ๐ )--alarm-metricโ add a metric threshold/alarm (yes queen, three names, one job ๐)--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 (the shorter-flavored twin ๐ธ)--metric-dir-restoreโ restore last value taken from the metrics dir (also the shorter twin ๐ธ)--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 (same, same ๐)--stats-httpโ prefix stats server json output with http headers ๐--stats-minifiedโ minify statistics json output ๐๏ธ--stats-minโ minify statistics json output (identical twin, they're obsessed with each other ๐ซถ)--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 (plural edition ๐ง)--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โ 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 (the short king ๐)--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 specifiedmodifier1when subscribing ๐๏ธ--snmpโ enable the embedded snmp server ๐ฒ--snmp-communityโ set the snmp community string ๐ฒ๐ค--ssl-verboseโ be verbose about SSL errors ๐ฃ๏ธ๐--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) ๐ฑ--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 theuwsgibinary with a new command (before privileges drop) ๐ฉน--unprivileged-binary-patchโ patch theuwsgibinary with a new command (after privileges drop) ๐ฉน--privileged-binary-patch-argโ patch theuwsgibinary with a new command and arguments (before privileges drop) ๐ฉนโ--unprivileged-binary-patch-argโ patch theuwsgibinary 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โ applystrftimeto logformat output โฐ--log-format-strftimeโ applystrftimeto 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โ 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 ๐จ
okay and that's the end of this chunk bestie, more coming, stay tuned ๐
--segfault-alarmโ the moment the segmentation fault handler fires, raise the alarm you named. yes bestie, segfaults get their own โจklaxonโจ--alarm-backlogโ raise the specified alarm when the socket backlog queue is full ๐ญ--backlog-alarmโ same energy, same job: raise the specified alarm when the socket backlog queue is full. it's the same option, just a different alias ๐ซถ--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 โจ--log-alarmโ when a log line matches your regexp, raise the specified alarm. syntax:<alarm>[,alarm...] <regexp>๐ฅ--alarm-logโ same thing, different name order: raise the specified alarm when a log line matches the specified regexp. syntax:<alarm>[,alarm...] <regexp>--not-log-alarmโ the opposite vibe: 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โ show me all the enabled alarms ๐--alarms-listโ also lists enabled alarms. twins fr fr ๐--alarm-msg-sizeโ set the max size of an alarm message. default is8192๐--log-masterโ hand the logging off to the master process. delegation, main character energy โจ--log-master-bufsizeโ set the buffer size for the master logger. heads up bestie: bigger log messages will be truncated ๐--log-master-streamโ create the master logpipe asSOCK_STREAM--log-master-req-streamโ create the master requests logpipe asSOCK_STREAM--log-reopenโ reopen the log after a reload ๐--log-truncateโ truncate the log on startup. fresh slate, clean girl aesthetic ๐--log-maxsizeโ set the maximum logfile size--log-backupnameโ set the logfile name to use after rotation--logdateโ prefix your logs with a date, or with astrftimestring ๐๏ธ--log-dateโ same: prefix logs with a date or astrftimestring--log-prefixโ prefix logs with a string of your choosing--log-zeroโ log responses that have no body at all ๐ซฅ--log-slowโ log any request slower than the number of milliseconds you specify ๐--log-4xxโ log requests that came back with a4xxresponse--log-5xxโ log requests that came back with a5xxresponse--log-bigโ log requestes bigger than the specified size (the typo stays, it's canon now ๐ )--log-sendfileโ logsendfilerequests--log-ioerrorโ log requests that hit io errors--log-microsโ report response time in microseconds instead of milliseconds. precision era โฑ๏ธ--log-x-forwarded-forโ use the ip from theX-Forwarded-Forheader instead ofREMOTE_ADDR
--master-as-rootโ leave the master process running as root ๐--drop-after-initโ run the privileges drop after plugin initialization. note: this one is superseded bydrop-after-apps--drop-after-appsโ run the privileges drop after apps loading. note: this one is superseded bymaster-as-root--force-cwdโ force the initial working directory to the value you give it--binshโ override/bin/sh(it's used by exec hooks, and it always falls back to/bin/sh)--chdirโchdirto the specified directory before apps loading--chdir2โchdirto the specified directory after apps loading--lazyโ set lazy mode: load apps in the workers instead of the master ๐ด--lazy-appsโ load apps in each worker instead of the master--cheapโ set cheap mode: workers only get spawned after the very first request ๐ช--cheaperโ set cheaper mode, aka adaptive process spawning ๐--cheaper-initialโ set the initial number of processes to spawn in cheaper mode--cheaper-algoโ choose which algorithm gets used for adaptive process spawning--cheaper-stepโ how many additional processes to spawn at each overload--cheaper-overloadโ increase workers after the specified overload--cheaper-algo-listโ list the enabled cheapers algorithms--cheaper-algos-listโ list the enabled cheapers algorithms ๐--cheaper-listโ list the enabled cheapers algorithms (yes, all three names, we love a triple threat)--cheaper-rss-limit-softโ don't spawn new workers if the total resident memory usage of all workers is higher than this limit--cheaper-rss-limit-hardโ if the total workers resident memory usage is higher, try to stop workers ๐--idleโ set idle mode: put uWSGI into cheap mode after a period of inactivity--die-on-idleโ shut uWSGI down when it goes idle. dramatic exit, respect ๐--mountโ load an application under a mountpoint--worker-mountโ load an application under a mountpoint in the specified worker, or after workers spawn--threadsโ run each worker in prethreaded mode with the number of threads you specify ๐งต--thread-stacksizeโ set threads stacksize--threads-stacksizeโ set threads stacksize--thread-stack-sizeโ set threads stacksize--threads-stack-sizeโ set threads stacksize (four aliases, one destiny โจ)--vhostโ enable virtualhosting mode, based on theSERVER_NAMEvariable--vhost-hostโ enable virtualhosting mode, based on theHTTP_HOSTvariable
routing time, bestie, this is where it gets fun ๐ฃ๏ธ
--routeโ add a route--route-hostโ add a route based on theHostheader--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 withgoto)--route-ifโ add a route based on a condition--route-if-notโ add a route based on a condition, but the negate version ๐--route-runโ always run the specified route action--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 theHostheader--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 withgoto)--final-route-ifโ add a final route based on a condition--final-route-if-notโ add a final route based on a condition, negate version ๐--final-route-runโ always run the specified final route action--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 theHostheader--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 withgoto)--error-route-ifโ add an error route based on a condition--error-route-if-notโ add an error route based on a condition, negate version ๐--error-route-runโ always run the specified error route action--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 theHostheader--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 withgoto)--response-route-ifโ add a response route based on a condition--response-route-if-notโ add a response route based on a condition, negate version ๐--response-route-runโ always run the specified response route action--router-listโ list the enabled routers ๐--routers-listโ list the enabled routers (same, just plural-coded)
--error-page-403โ add an error page (html) for the managed403response ๐ซ--error-page-404โ add an error page (html) for the managed404response ๐ซฅ--error-page-500โ add an error page (html) for the managed500response ๐ฅ--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 the websockets ping/pong subsystem--websocket-pong-toleranceโ set the tolerance (in seconds) of the websockets ping/pong subsystem--websockets-max-sizeโ set the max allowed size of websocket messages, in Kbytes. default is1024๐ฆ--websocket-max-sizeโ set the max allowed size of websocket messages, in Kbytes. default is1024--chunked-input-limitโ set the max size of a chunked input part. default is1MB, in bytes--chunked-input-timeoutโ set the default timeout for chunked input โณ--clockโ set a clock source ๐ฐ๏ธ--clock-listโ list the enabled clocks--clocks-listโ list the enabled clocks (plural edition, iconic)--add-headerโ automatically add HTTP headers to the response--rem-headerโ automatically remove the specified HTTP header from the response--del-headerโ automatically remove the specified HTTP header from the response โ๏ธ--collect-headerโ store the specified response header in a request var. syntax:header var๐--response-header-collectโ bestie, this one stashes a response header into a request var ๐พ syntax isheader varโ header first, var second, don't flip them or it's giving chaos.--pull-headerโ same idea but feral: it stores the specified response header in a request var AND yoinks it out of the response entirely ๐ญ syntax again isheader var.--check-staticโ go look for static files in the directory you name. that's it, that's the whole vibe ๐--check-static-docrootโ same energy but it checks the requestedDOCUMENT_ROOTinstead of a dir you picked โจ--static-checkโ literally the twin of--check-static: check for static files in the specified directory ๐ฆ--static-mapโ maps a mountpoint to a static directory (or a file) ๐บ๏ธ iconic.--static-map2โ like--static-mapexcept it completely appends the requested resource to the docroot. no cap, that's the difference ๐--static-skip-extโ skips the extension you name from staticfile checks ๐--static-indexโ if someone requests a directory, go search for the file you specified ๐--static-safeโ if the file lives under the path you give, skip the security checks. yes, really, that's what it does ๐ซถ--static-cache-pathsโ drops resolved paths into the uWSGI cache for however many seconds you say โฑ๏ธ--static-cache-paths-nameโ use the cache you name for those static paths ๐งบ--mimefileโ sets the mime types file path, and the default is/etc/mime.types๐--mime-fileโ same thing, different spelling, default still/etc/mime.types๐--static-expires-typeโ sets theExpiresheader based on content type โณ--static-expires-type-mtimeโ sets theExpiresheader based on content type and the file mtime ๐ฅ--static-expiresโ sets theExpiresheader based on a filename regexp ๐ง--static-expires-mtimeโExpiresheader based on filename regexp and file mtime, the deluxe combo โจ--static-expires-uriโ sets theExpiresheader based on aREQUEST_URIregexp ๐--static-expires-uri-mtimeโExpiresheader based onREQUEST_URIregexp and file mtime ๐--static-expires-path-infoโ sets theExpiresheader based on aPATH_INFOregexp ๐ธ--static-expires-path-info-mtimeโExpiresheader based onPATH_INFOregexp and file mtime, yes the pattern continues and yes we love consistency โญ--static-gzipโ if the regexp you supply matches the static file translation, it goes looking for a gzip version ๐๏ธ--static-gzip-allโ checks for a gzip version of all requested static files. all of them. every single one ๐--static-gzip-dirโ checks for a gzip version of all requested static files in the dir/prefix you specify ๐--static-gzip-prefixโ same deal: checks for a gzip version of all requested static files in the specified dir/prefix ๐--static-gzip-extโ checks for a gzip version of all requested static files with the ext/suffix you give ๐--static-gzip-suffixโ again, twin behavior: checks for a gzip version of all requested static files with the specified ext/suffix ๐--honour-rangeโ turns on support for the HTTPRangeheader ๐--offload-threadsโ sets how many offload threads to spawn โ that's per-worker, and the default is0๐งต--offload-threadโ the singular spelling of the exact same thing: offload threads to spawn, per-worker, default0๐งต--file-serve-modeโ sets the static file serving mode ๐ฝ๏ธ--fileserve-modeโ also sets the static file serving mode. same setting, no space in the name ๐ฝ๏ธ--disable-sendfileโ killssendfile()and makes you rely on the boring oldread()/write()instead ๐ด--check-cacheโ checks for response data in the cache you specify โ leave it empty for the default cache ๐๏ธ--close-on-execโ sets close-on-exec on connection sockets. could be required if you're spawning processes in requests ๐ถ--close-on-exec2โ sets close-on-exec on server sockets. also possibly required for spawning processes in requests ๐ถ--modeโ set uWSGI custom mode ๐๏ธ--envโ set environment variable ๐ฑ--envdirโ loads a daemontools compatible envdir ๐--early-envdirโ loads a daemontools compatible envdir ASAP, no waiting around โก--unenvโ unset environment variable ๐ซ--vacuumโ tries to remove all of the generated file/sockets ๐งน spring cleaning fr fr--file-writeโ writes the content you specify to the file you specify (syntax:file=value) before privileges drop โ ๏ธ order matters here bestie.--cgroupโ puts the processes in the cgroup you name ๐ช--cgroup-optโ set value in specified cgroup option โ๏ธ--cgroup-dir-modeโ sets permission for the cgroup directory, and the default is700๐--namespaceโ run in a new namespace under the specified rootfs ๐ซง--namespace-keep-mountโ keeps the mountpoint you specify 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โ enables PROXY1 protocol support, and heads up: it's only for http parsers ๐จ--reuse-portโ enables theREUSE_PORTflag on the socket, and that's BSD only ๐ก--tcp-fast-openโ enables theTCP_FASTOPENflag on TCP sockets with the qlen value you specify ๐--tcp-fastopenโ enables theTCP_FASTOPENflag on TCP sockets with the specified qlen value ๐--tcp-fast-open-clientโ usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if it's supported ๐๏ธ--tcp-fastopen-clientโ same: usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if supported ๐๏ธ--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 UNIX socket you specify ๐--cronโ add a cron task โฐ--cron2โ add a cron task withkey=valsyntax ๐--unique-cronโ add a unique cron task ๐--cron-harakiriโ sets the maximum time in seconds we wait for a cron command to complete โ--legion-cronโ adds a cron task that's runnable only when the instance is a lord of the specified legion ๐--cron-legionโ adds a cron task runnable only when the instance is a lord of the specified legion ๐--unique-legion-cronโ adds a unique cron task runnable only when the instance is a lord of the specified legion ๐๐--unique-cron-legionโ adds a unique cron task runnable only when the instance is a lord of the specified legion ๐๐--loopโ select the uWSGI loop engine ๐--loop-listโ lists enabled loop engines ๐--loops-listโ lists enabled loop engines ๐--worker-execโ run the command you specify as a worker ๐--worker-exec2โ run the specified command as worker, but this time after thepost_forkhook ๐ช--attach-daemonโ attaches a command/daemon to the master process, and important: the command has to not go in the background โ ๏ธ--attach-control-daemonโ attaches a command/daemon to the master process (again, the command has to not go in background), and when the daemon dies, the master dies too ๐ lowkey dramatic but that's the deal.--smart-attach-daemonโ attaches a command/daemon to the master process managed by a pidfile, and here the command has to daemonize ๐ง--smart-attach-daemon2โ attaches a command/daemon to the master process managed by a pidfile, and here the command has to NOT daemonize ๐ง--legion-attach-daemonโ same as--attach-daemonbut the daemon runs only on the legion lord node ๐--legion-smart-attach-daemonโ same as--smart-attach-daemonbut the daemon runs only on the legion lord node ๐--legion-smart-attach-daemon2โ same as--smart-attach-daemon2but the daemon runs only 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, and yep it supports smart modes too ๐--pluginsโ load uWSGI plugins ๐งฉ--pluginโ load uWSGI plugins ๐งฉ--need-pluginsโ load uWSGI plugins and exit on error ๐ช--need-pluginโ load uWSGI plugins, exit on error ๐ช--plugins-dirโ adds a directory to the uWSGI plugin search path ๐--plugin-dirโ adds a directory to the uWSGI plugin search path ๐--plugins-listโ lists enabled plugins ๐--plugin-listโ lists enabled plugins ๐--autoloadโ tries to automatically load plugins when unknown options are found ๐ช--dlopenโ blindly loads a shared library ๐ no thoughts, just vibes.--allowed-modifiersโ comma separated list of allowed modifiers โ--remap-modifierโ remaps a request modifier from one id to another ๐--dump-optionsโ dumps the full list of available options ๐๏ธ--show-configโ shows the current config reformatted as ini ๐--binary-append-dataโ returns the content of a resource to stdout for appending to a uwsgi binary (fordata://usage) ๐--printโ simple print ๐จ๏ธ--iprintโ simple print, but the immediate version โก--exitโ forceexit()of the instance ๐ช--cflagsโ reports uWSGICFLAGS, which is useful for building external plugins ๐ ๏ธ--dot-hโ dumps theuwsgi.hused for building the core, useful for building external plugins ๐ฆ--config-pyโ dumps theuwsgiconfig.pyused for building the core, also useful for building external plugins ๐--build-pluginโ builds a uWSGI plugin for the current binary ๐จ--versionโ prints the uWSGI version ๐ท๏ธ--response-headers-limitโ sets the response header maximum size, default:64k๐--wsgi-fileโ load a.wsgifile ๐--fileโ load a.wsgifile ๐--evalโ eval python code ๐งช-w|--moduleโ load a WSGI module ๐ฆ-w|--wsgiโ load a WSGI module ๐ฆ--callableโ set the default WSGI callable name ๐-J|--testโ test a module import ๐งช-H|--homeโ setPYTHONHOME/virtualenv ๐-H|--virtualenvโ setPYTHONHOME/virtualenv ๐-H|--venvโ setPYTHONHOME/virtualenv ๐-H|--pyhomeโ setPYTHONHOME/virtualenv ๐--py-programnameโ set python program name ๐ท๏ธ--py-program-nameโ set python program name ๐ท๏ธ--pythonpathโ adds a directory (or glob) to pythonpath ๐ค๏ธ--python-pathโ adds a directory (or glob) to pythonpath ๐ค๏ธ--ppโ adds a directory (or glob) to pythonpath ๐ค๏ธ--pymodule-aliasโ add a python alias module ๐ช--post-pymodule-aliasโ adds a python module alias after uwsgi module initialization โญ๏ธ--importโ import a python module ๐ฅ--pyimportโ import a python module ๐ฅ--py-importโ import a python module ๐ฅ--python-importโ import a python module ๐ฅ--shared-importโ import a python module in all of the processes ๐ฏ--shared-pyimportโ import a python module in all of the processes ๐ฏ--shared-py-importโ import a python module in all of the processes ๐ฏ--shared-python-importโ import a python module in all of the processes ๐ฏ--spooler-importโ import a python module in the spooler ๐--spooler-pyimportโ import a python module in the spooler (yep, same vibe, different spelling, bestie)--spooler-py-importโ import a python module in the spooler (another alias, they really said โlet me give you optionsโ)--spooler-python-importโ import a python module in the spooler (the last of the spooler-import quadruplets)--pyargvโ manually setsys.argv๐-O,--optimizeโ set python optimization level ๐ง--pecanโ load a pecan config file ๐ฅง--pasteโ load apaste.deployconfig file ๐ฆ--paste-loggerโ enable paste fileConfig logger ๐ชต--web3โ load a web3 app ๐--pumpโ load a pump app ๐ง--wsgi-liteโ load a wsgi-lite app ๐ชถ--ini-pasteโ load apaste.deployconfig file containing uwsgi section ๐--ini-paste-loggedโ load apaste.deployconfig file containing uwsgi section (load loggers too) ๐--reload-os-envโ force reload ofos.environat each request ๐--no-siteโ do not importsitemodule ๐ซ--pyshellโ run an interactive python shell in the uWSGI environment ๐--pyshell-oneshotโ run an interactive python shell in the uWSGI environment (one-shot variant) ๐ฏ--pythonโ run a python script in the uWSGI environment ๐--pyโ run a python script in the uWSGI environment โจ--pyrunโ run a python script in the uWSGI environment ๐โโ๏ธ--py-tracebackerโ enable the uWSGI python tracebacker ๐--py-auto-reloadโ monitor python modules mtime to trigger reload (use only in development) โ ๏ธ--py-autoreloadโ monitor python modules mtime to trigger reload (use only in development) โ ๏ธ--python-auto-reloadโ monitor python modules mtime to trigger reload (use only in development) โ ๏ธ--python-autoreloadโ monitor python modules mtime to trigger reload (use only in development) โ ๏ธ--py-auto-reload-ignoreโ ignore the specified module during auto-reload scan (can be specified multiple times) ๐--wsgi-env-behaviourโ set the strategy for allocating/deallocating the WSGI env ๐ง--wsgi-env-behaviorโ set the strategy for allocating/deallocating the WSGI env ๐ง--start_response-nodelayโ send WSGI http headers as soon as possible (PEP violation) ๐จ--wsgi-strictโ try to be fully PEP compliant disabling optimizations ๐--wsgi-accept-bufferโ accept CPython buffer-compliant objects as WSGI response in addition to string/bytes ๐งบ--wsgi-accept-buffersโ accept CPython buffer-compliant objects as WSGI response in addition to string/bytes ๐งบ--wsgi-disable-file-wrapperโ disablewsgi.file_wrapperfeature ๐ซ--python-versionโ report python version ๐ข--python-rawโ load a python file for managing raw requests ๐--py-sharedareaโ create a sharedarea from a python bytearray object of the specified size ๐งฉ--py-call-osafterforkโ enable child processes running cpython to trap OS signals ๐ก--py-call-uwsgi-fork-hooksโ call pre and post hooks when uswgi forks to update the internal interpreter state of CPython ๐ช--python-worker-overrideโ override worker with the specified python script ๐--py-executableโ overridesys.executablevalue ๐--py-sys-executableโ overridesys.executablevalue ๐
that's the whole manual page, bestie! this was UWSGI_PYTHON311(1) from uwsgi_python311 version 2.0.21-debian, dated May 2023. go forth and slay your python web apps ๐
โจ
๐ฆ where this page comes from
- debian bookworm: uwsgi-plugin-python3 2.0.21-5.1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms