UWSGI_PYTHON310(1)
โจ NAME โจ
uwsgi_python310(1) โ bestie, meet your new obsession: a fast (pure C), self-healing, developer-friendly WSGI server. Like, it's giving main character energy for your Python web apps. ๐
โจ SYNOPSIS โจ
uwsgi-core-local [options...]
โจ DESCRIPTION โจ
Okay so this is the part where we spill all the options. There are literally so many. Grab a boba, get comfy, and let's go through them one by one. No cap, every single flag matters. This is part 1 of 7, so buckle up. ๐ง
-s|--socketโ binds to the UNIX/TCP socket you specify, using the default protocol. Classic. โจ-s|--uwsgi-socketโ binds to the UNIX/TCP socket you specify, using theuwsgiprotocol. Same socket vibe, different protocol. ๐--suwsgi-socketโ binds to the UNIX/TCP socket you specify, using theuwsgiprotocol over SSL. Secure slay. ๐--ssl-socketโ binds to the UNIX/TCP socket you specify, using theuwsgiprotocol over SSL. Yes, it's the same as above โ duplicate energy, still valid. ๐ธ--http-socketโ binds to the UNIX/TCP socket you specify, using HTTP protocol. The people's champ. ๐--http-socket-modifier1โ forces the modifier1 you specify when using HTTP protocol. Niche but iconic. ๐--http-socket-modifier2โ forces the modifier2 you specify when using HTTP protocol. Twin energy. ๐ฆ--http11-socketโ binds to the UNIX/TCP socket you specify, using HTTP 1.1 (Keep-Alive) protocol. Your connections stay alive, bestie. ๐--https-socketโ binds to the UNIX/TCP socket you specify, using HTTPS protocol. The secure glow-up. ๐ฅ--https-socket-modifier1โ forces the modifier1 you specify when using HTTPS protocol. You know the drill. โจ--https-socket-modifier2โ forces the modifier2 you specify when using HTTPS protocol. Periodt. ๐--fastcgi-socketโ binds to the UNIX/TCP socket you specify, using FastCGI protocol. Old school but still cute. ๐--fastcgi-nph-socketโ binds to the UNIX/TCP socket you specify, using FastCGI protocol (nph mode). Niche flex. ๐ง--fastcgi-modifier1โ forces the modifier1 you specify when using FastCGI protocol. ๐--fastcgi-modifier2โ forces the modifier2 you specify when using FastCGI protocol. ๐ฆ--scgi-socketโ binds to the UNIX/TCP socket you specify, using SCGI protocol. Underrated fr fr. ๐ธ--scgi-nph-socketโ binds to the UNIX/TCP socket you specify, using SCGI protocol (nph mode). We love a variant. ๐--scgi-modifier1โ forces the modifier1 you specify when using SCGI protocol. ๐--scgi-modifier2โ forces the modifier2 you specify when using SCGI protocol. โจ--raw-socketโ binds to the UNIX/TCP socket you specify, using RAW protocol. No filter, just vibes. ๐ฅ--raw-modifier1โ forces the modifier1 you specify when using RAW protocol. ๐--raw-modifier2โ forces the modifier2 you specify when using RAW protocol. ๐ฆ--puwsgi-socketโ binds to the UNIX/TCP socket you specify, using persistent uwsgi protocol (puwsgi). Commitment issues? Not here. ๐--protocolโ forces the protocol you specify for default sockets. You're in charge. ๐--socket-protocolโ forces the protocol you specify for default sockets. Same as above. Twin flame. โจ--shared-socketโ creates a shared socket for advanced jailing or ipc. Big brain move. ๐ง--undeferred-shared-socketโ creates a shared socket for advanced jailing or ipc (undeferred mode). The sequel. ๐-p|--processesโ spawns the number of workers/processes you specify. Pop off. ๐-p|--workersโ spawns the number of workers/processes you specify. Same as above, just a different name. Slay. ๐--thunder-lockโ serializesaccept()usage (if possible). Thunder lock, iconic. โก-t|--harakiriโ sets the harakiri timeout. Dramatic name, serious business. ๐ก๏ธ--harakiri-verboseโ enables verbose mode for harakiri. It'll tell you everything. ๐ญ--harakiri-no-arhโ does not enable harakiri during after-request-hook. Boundaries. ๐ซ--no-harakiri-arhโ does not enable harakiri during after-request-hook. Same boundary, different flag. ๐--no-harakiri-after-req-hookโ does not enable harakiri during after-request-hook. Third time's the charm. Still no harakiri there. โจ--backtrace-depthโ sets backtrace depth. For when you need the tea. ๐ต--mule-harakiriโ sets harakiri timeout for mule tasks. Mule-specific drama. ๐ด-x|--xmlconfigโ loads config from an XML file. Old school cool. ๐-x|--xmlโ loads config from an XML file. Same XML config, shorter name. โจ--configโ loads configuration using the pluggable system. Flexible queen. ๐--fallback-configโ re-execs uwsgi with the config you specify when exit code is 1. Backup plan energy. ๐--strictโ enables strict mode (placeholder cannot be used). Placeholders? Not allowed. No cap. ๐ซ--skip-zeroโ skips check of file descriptor 0. Bye. ๐--skip-atexitโ skips atexit hooks (ignored by the master). Note: the master ignores this. ๐--skip-atexit-teardownโ skips atexit teardown (ignored by the master). Master still ignores it. ๐-S|--setโ sets a placeholder or an option. Multitasking icon. ๐--set-placeholderโ sets a placeholder. Just that. โจ--set-phโ sets a placeholder. Placeholder setter, short version. ๐--getโ prints the option value you specify and exits. Hit and run. ๐โโ๏ธ--declare-optionโ declares a new uWSGI custom option. DIY queen. ๐--declare-option2โ declares a new uWSGI custom option (non-immediate). The sequel. ๐ฆ--resolveโ places the result of a dns query in the placeholder you specify, sytax:placeholder=name(immediate option). Yes, 'sytax' is a typo, we're keeping it. ๐--forโ (opt logic) for cycle. Loops, but make it fashion. ๐--for-globโ (opt logic) for cycle (expand glob). Fancy loop. โจ--for-timesโ (opt logic) for cycle (expand the specified num to a list starting from 1). Math slay. ๐ข--for-readlineโ (opt logic) for cycle (expand the specified file to a list of lines). File-to-list pipeline. ๐--endforโ (opt logic) end for cycle. Bye loop. ๐--end-forโ (opt logic) end for cycle. Same end, different spelling. ๐--if-optโ (opt logic) check for option. Checks if an option exists. ๐--if-not-optโ (opt logic) check for option. Checks if an option does NOT exist. Negative queen. ๐ซ--if-envโ (opt logic) check for environment variable. ๐ฑ--if-not-envโ (opt logic) check for environment variable. Checks that an env var is not there. ๐--ifenvโ (opt logic) check for environment variable. Same as--if-env, but shorter. โจ--if-reloadโ (opt logic) check for reload. ๐--if-not-reloadโ (opt logic) check for reload. Checks for NOT reload. ๐ค--if-hostnameโ (opt logic) check for hostname. ๐--if-not-hostnameโ (opt logic) check for hostname. Checks that hostname doesn't match. ๐ซ--if-hostname-matchโ (opt logic) try to match hostname against a regular expression. Regex bestie. ๐--if-not-hostname-matchโ (opt logic) try to match hostname against a regular expression. Regex match, but NOT. Inverse. ๐--if-existsโ (opt logic) check for file/directory existence. ๐--if-not-existsโ (opt logic) check for file/directory existence. Checks if it does NOT exist. ๐ซ--ifexistsโ (opt logic) check for file/directory existence. Same as--if-exists, shorter. โจ--if-pluginโ (opt logic) check for plugin. ๐--if-not-pluginโ (opt logic) check for plugin. Checks for no plugin. ๐ซ--ifpluginโ (opt logic) check for plugin. Shorter plugin check. ๐--if-fileโ (opt logic) check for file existance. Yes, 'existance' typo, keeping it. ๐--if-not-fileโ (opt logic) check for file existance. Checks for file NOT existance. ๐ซ--if-dirโ (opt logic) check for directory existance. ๐--if-not-dirโ (opt logic) check for directory existance. Checks for directory NOT existance. ๐ซ--ifdirโ (opt logic) check for directory existance. Shorter directory check. โจ--if-directoryโ (opt logic) check for directory existance. Even longer directory check. ๐--endifโ (opt logic) end if. Bye condition. ๐--end-ifโ (opt logic) end if. Same end, hyphenated. โจ--blacklistโ sets options blacklist context. Denied. ๐ซ--end-blacklistโ clears options blacklist context. Freedom. ๐๏ธ--whitelistโ sets options whitelist context. Allowed. โ--end-whitelistโ clears options whitelist context. Bye. ๐--ignore-sigpipeโ does not report (annoying) SIGPIPE. We don't need that drama. ๐--ignore-write-errorsโ does not report (annoying)write()/writev()errors. Peace. โ๏ธ--write-errors-toleranceโ sets the maximum number of allowed write errors (default: no tolerance). Zero chill. ๐--write-errors-exception-onlyโ only raises an exception on write errors, giving control to the app itself. Delegation. ๐ค--disable-write-exceptionโ disables exception generation onwrite()/writev(). No exceptions. ๐ซ--inheritโ uses the file you specify as a config template. Inheritance but make it config. ๐--includeโ includes the file you specify as immediate configuration. Right now. โก--inject-beforeโ injects a text file before the config file (advanced templating). ๐งฌ--inject-afterโ injects a text file after the config file (advanced templating). Advanced templating, part two. ๐งฌ-d|--daemonizeโ daemonizes uWSGI. Background vibes. ๐--daemonize2โ daemonizes uWSGI after app loading. Fashionably late. โฐ--stopโ stops an instance. Bye bestie. ๐--reloadโ reloads an instance. Refresh. ๐--pauseโ pauses an instance. Timeout. โธ๏ธ--suspendโ suspends an instance. Sleep mode. ๐ด--resumeโ resumes an instance. Wake up. โ๏ธ--connect-and-readโ connects to a socket and waits for data from it. Patient queen. โณ--extractโ fetches/dumps any supported address to stdout. Data dump. ๐ค-l|--listenโ sets the socket listen queue size. Queue up. ๐๏ธ-v|--max-varsโ sets the amount of internal iovec/vars structures. Internals. ๐ง--max-appsโ sets the maximum number of per-worker applications. Limit. ๐ง-b|--buffer-sizeโ sets internal buffer size. Buffer bestie. ๐งบ-m|--memory-reportโ enables memory report. Receipts. ๐งพ--profilerโ enables the profiler you specify. Profile era. ๐-c|--cgi-modeโ forces CGI-mode for plugins supporting it. Retro. ๐ผ-a|--abstract-socketโ forces UNIX socket in abstract mode (Linux only). Linux only, bestie. ๐ง-C|--chmod-socketโ chmod-socket. Permissions slay. ๐-C|--chmodโ chmod-socket. Same chmod, different name. โจ--chown-socketโ chowns unix sockets. Ownership. ๐--umaskโ sets umask. Mask on. ๐ญ--freebindโ puts socket in freebind mode. Free to bind. ๐๏ธ--map-socketโ maps sockets to specific workers. Matchmaker. ๐-T|--enable-threadsโ enables threads. Thread party. ๐งต--no-threads-waitโ does not wait for threads cancellation on quit/reload. No waiting. ๐ซ--auto-procnameโ automatically sets processes name to something meaningful. Auto-naming. ๐ท๏ธ--procname-prefixโ adds a prefix to the process names. Prefix era. ๐ค--procname-prefix-spacedโ adds a spaced prefix to the process names. Space out. ๐--procname-appendโ appends a string to process names. Suffix. โ--procnameโ sets process names. Name it. ๐--procname-masterโ sets master process name. Master's name. ๐-i|--single-interpreterโ does not use multiple interpreters (where available). Single and ready to mingle. ๐--need-appโ exits if no app can be loaded. No app, no service. ๐ช-M|--masterโ enables master process. Master mode. ๐ง--honour-stdinโ does not remap stdin to/dev/null. Respect stdin. ๐--emperorโ runs the Emperor. All hail. ๐--emperor-proxy-socketโ forces the vassal to became an Emperor proxy. Yes, 'became' typo, keeping it. ๐ฐ--emperor-wrapperโ sets a binary wrapper for vassals. Wrap it up. ๐--emperor-wrapper-overrideโ sets a binary wrapper for vassals to try before the default one. Override. ๐ฅ--emperor-wrapper-fallbackโ sets a binary wrapper for vassals to try as a last resort. Backup plan. ๐--emperor-nofollowโ does not follow symlinks when checking for mtime. No follow. ๐ซ--emperor-procnameโ sets the Emperor process name. Royal naming. ๐--emperor-freqโ sets the Emperor scan frequency (default 3 seconds). Tick tock. โฐ--emperor-required-heartbeatโ sets the Emperor tolerance about heartbeats. Heartbeat check. ๐--emperor-curse-toleranceโ sets the Emperor tolerance about cursed vassals. Cursed energy. ๐งโโ๏ธ--emperor-pidfileโ writes the Emperor pid in the file you specify. PID file. ๐--emperor-tyrantโ puts the Emperor in Tyrant mode. Tyrant era. ๐--emperor-tyrant-nofollowโ does not follow symlinks when checking for uid/gid in Tyrant mode. No follow. ๐ซ--emperor-statsโ runs the Emperor stats server. Stats slay. ๐--emperor-stats-serverโ runs the Emperor stats server. Same stats server, different flag. โจ--early-emperorโ spawn the emperor as soon as possibile ๐ญโจ--emperor-broodlordโ run the emperor in BroodLord mode ๐--emperor-throttleโ set throttling level (in milliseconds) for bad behaving vassals (default1000) ๐ค--emperor-max-throttleโ set max throttling level (in milliseconds) for bad behaving vassals (default3 minutes) ๐ฆ--emperor-magic-execโ prefix vassals config files withexec://if they have the executable bit ๐ช--emperor-on-demand-extensionโ search for text file (vassal name + extension) containing the on demand socket name ๐--emperor-on-demand-extโ search for text file (vassal name + extension) containing the on demand socket name ๐--emperor-on-demand-directoryโ enable on demand mode binding to the unix socket in the specified directory named like the vassal +.socket๐--emperor-on-demand-dirโ enable on demand mode binding to the unix socket in the specified directory named like the vassal +.socket๐--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) ๐ฅ๏ธ--emperor-extra-extensionโ allows the specified extension in the Emperor (vassal will be called with--config) ๐--emperor-extra-extโ allows the specified extension in the Emperor (vassal will be called with--config) ๐--emperor-no-blacklistโ disable Emperor blacklisting subsystem ๐ซ--emperor-use-cloneโ useclone()instead offork()passing the specifiedunshare()flags ๐งฌ--emperor-graceful-shutdownโ use vassals graceful shutdown during ragnarok ๐--emperor-capโ set vassals capability ๐ฉ--vassals-capโ set vassals capability ๐ฉ--vassal-capโ set vassals capability ๐ฉ--imperial-monitor-listโ list enabled imperial monitors ๐--imperial-monitors-listโ list enabled imperial monitors ๐--vassals-inheritโ add config templates to vassals config (uses--inherit) ๐--vassals-includeโ include config templates to vassals config (uses--includeinstead of--inherit) ๐--vassals-inherit-beforeโ add config templates to vassals config (uses--inherit, parses before the vassal file) ๐--vassals-include-beforeโ include config templates to vassals config (uses--includeinstead of--inherit, parses before the vassal file) ๐--vassals-start-hookโ run the specified command before each vassal starts ๐--vassals-stop-hookโ run the specified command after vassal's death โฐ๏ธ--vassal-sosโ ask emperor for reinforcement when overloaded ๐--vassal-sos-backlogโ ask emperor for sos if 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 โ๏ธ--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 ๐--print-symโ print content of the specified binary symbol ๐จ๏ธ--print-symbolโ print content of the specified binary symbol ๐จ๏ธ-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 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 ๐ก๏ธ--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 โฑ๏ธ--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 ๐ถ--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) ๐--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 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 โญ๏ธ--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 ๐ด--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 ๐--refork-post-jailโ okay so this one doesfork()again after jailing. Useful for jailing systems ๐--re-fork-post-jailโ same energy, literally:fork()again after jailing. Useful for jailing systems โจ--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 enter 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 enter 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 send a stop message ๐--hook-emperor-reloadโ run the specified hook when the Emperor send 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-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-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-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 ๐--wait-for-interfaceโ wait for the specified network interface to come up before running root hooks ๐--wait-for-interface-timeoutโ set the timeout for wait-for-interface โณ--wait-interfaceโ wait for the specified network interface to come up before running root hooks ๐--wait-interface-timeoutโ set the timeout for wait-for-interface โณ--wait-for-ifaceโ wait for the specified network interface to come up before running root hooks ๐--wait-for-iface-timeoutโ set the timeout for wait-for-interface โณ--wait-ifaceโ wait for the specified network interface to come up before running root hooks ๐--wait-iface-timeoutโ set the timeout for wait-for-interface โณ--wait-for-fsโ wait for the specified filesystem item to appear before running root hooks ๐--wait-for-fileโ wait for the specified file to appear before running root hooks ๐--wait-for-dirโ wait for the specified directory to appear before running root hooks ๐--wait-for-mountpointโ wait for the specified mountpoint to appear before running root hooks ๐--wait-for-fs-timeoutโ set the timeout for wait-for-fs/file/dir โณ--wait-for-socketโ wait for the specified socket to be ready before loading apps ๐--wait-for-socket-timeoutโ set the timeout for wait-for-socket โณ--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 ๐--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 ๐งพ--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โ destroy the instance if a filesystem is no more reachable (useful for reliable Fuse management) ๐--mountpoint-checkโ destroy the instance if a filesystem is no more reachable (useful for reliable Fuse management)--check-mountโ destroy the instance if a filesystem is no more reachable (useful for reliable Fuse management)--mount-checkโ destroy the instance if a filesystem is no more reachable (useful for reliable Fuse management)
bestie, yes, those are four separate options that all do the exact same thing. iconic behaviour. we don't question it, we just respect it. โจ
--propagate-touchโ over-engineering option for system with flaky signal management ๐ญ--limit-postโ limit request body--no-orphansโ automatically kill workers if master dies (can be dangerous for availability)
โ ๏ธ read that again: can be dangerous for availability. it's giving "protective but also kind of a menace".
--prioโ set processes/threads priority ๐--cpu-affinityโ set cpu affinity--post-bufferingโ set size in bytes after which will buffer to disk instead of memory--post-buffering-bufsizeโ set buffer size forread()in post buffering mode--body-read-warningโ set the amount of allowed memory allocation (in megabytes) for request body before starting 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)
๐ซถ discouraged, use only for testing โ so like, don't ship this, bestie. testing only. no cap.
--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
โจ METRICS, THE WHOLE VIBE โจ
--enable-metricsโ enable metrics subsystem ๐--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
three names, one destiny. threshold/alarm gang. ๐
--metrics-dirโ export metrics as text files to the specified directory--metrics-dir-restoreโ restore last value taken from the metrics dir--metric-dirโ export metrics as text files to the specified directory--metric-dir-restoreโ restore last value taken from the metrics dir--metrics-no-coresโ disable generation of cores-related metrics--udpโ run the udp server on the specified address--statsโ enable the stats server on the specified address--stats-serverโ enable the stats server on the specified address--stats-httpโ prefix stats server json output with http headers--stats-minifiedโ minify statistics json output--stats-minโ minify statistics json output--stats-pushโ push the stats json to the specified destination--stats-pusher-default-freqโ set the default frequency of stats pushers--stats-pushers-default-freqโ set the default frequency of stats pushers--stats-no-coresโ disable generation of cores-related stats--stats-no-metricsโ do not include metrics in stats output--multicastโ subscribe to specified multicast group--multicast-ttlโ set multicast ttl--multicast-loopโ set multicast loop (default 1)--master-fifoโ enable the master fifo ๐--notify-socketโ enable the notification socket--subscription-notify-socketโ set the notification socket for subscriptions
โจ LEGION (yes it's really called that) โจ
--legionโ became a member of a legion--legion-mcastโ became a member of a legion (shortcut for multicast)--legion-nodeโ add a node to a legion--legion-freqโ set the frequency of legion packets--legion-toleranceโ set the tolerance of legion subsystem--legion-death-on-lord-errorโ declare itself as a dead node for the specified amount of seconds if one of the lord hooks fails ๐--legion-skew-toleranceโ set the clock skew tolerance of legion subsystem (default 30 seconds)--legion-lordโ action to call on Lord election ๐--legion-unlordโ action to call on Lord dismiss--legion-setupโ action to call on legion setup--legion-deathโ action to call on legion death (shutdown of the instance)--legion-joinโ action to call on legion join (first time quorum is reached)--legion-node-joinedโ action to call on new node joining legion--legion-node-leftโ action to call node leaving legion--legion-quorumโ set the quorum of a legion--legion-scrollโ set the scroll of a legion--legion-scroll-max-sizeโ set max size of legion scroll buffer--legion-scroll-list-max-sizeโ set max size of legion scroll list buffer
โจ SUBSCRIPTIONS โจ
--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 specififed modifier1 when subscribing
ok so "specififed" is literally spelled that way in here and we are preserving it. historical artefact. do not touch. ๐
โจ SNMP + SSL โจ
--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 for cert/key/client_ca file in the specified directory and create a sni/ssl context on demand--sni-dir-ciphersโ set ssl ciphers for sni-dir option--ssl-enable3โ enable SSLv3 (insecure) ๐จ--ssl-enable-sslv3โ enable SSLv3 (insecure) ๐จ--ssl-enable-tlsv1โ enable TLSv1 (insecure) ๐จ
bestie. insecure. all three of them. it's giving "please don't". we're just the messenger. ๐ญ
--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) ๐
โจ LOGGING โจ
--logtoโ set logfile/udp address--logto2โ log to specified file or udp address after privileges drop--log-formatโ set advanced format for request logging--logformatโ set advanced format for request logging--logformat-strftimeโ apply strftime to logformat output--log-format-strftimeโ apply strftime to logformat output--logfile-chownโ chown logfiles--logfile-chmodโ chmod logfiles--log-syslogโ log to syslog--log-socketโ send logs to the specified socket--req-loggerโ set/append a request logger--logger-reqโ set/append a request logger--loggerโ set/append a logger--logger-listโ list enabled loggers--loggers-listโ list enabled loggers--threaded-loggerโ offload log writing to a thread ๐งต--log-encoderโ add an item in the log encoder chain--log-req-encoderโ add an item in the log req encoder chain--log-drainโ drain (do not show) log lines matching the specified regexp--log-filterโ show only log lines matching the specified regexp--log-routeโ log to the specified named logger if regexp applied on logline matches--log-req-routeโ log requests to the specified named logger if regexp applied on logline matches--use-abortโ 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 (default 3 seconds)--alarm-fdโ raise the specified alarm when an fd is read for read (by default it reads 1 byte, set 8 for eventfd)--alarm-segfaultโ raise the specified alarm when the segmentation fault handler is executed--segfault-alarmโ fires off the alarm you specify the moment the segmentation fault handler gets executed ๐ (yeah, that handler, the one nobody wants to meet)--alarm-backlogโ raises the specified alarm when the socket backlog queue is full--backlog-alarmโ same energy, same job: raises the specified alarm when the socket backlog queue is full ๐ซถ--lq-alarmโ raises the specified alarm when the socket backlog queue is full--alarm-lqโ raises the specified alarm when the socket backlog queue is full--alarm-listen-queueโ raises the specified alarm when the socket backlog queue is full--listen-queue-alarmโ raises the specified alarm when the socket backlog queue is full
okay so yes, that's six whole spellings of the same idea. the backlog is full, the alarm goes off, pick whichever name your fingers like ๐
--log-alarmโ raises the specified alarm when a log line matches the regexp you gave, syntax:<alarm>[,alarm...] <regexp>--alarm-logโ raises the specified alarm when a log line matches the regexp you gave, syntax:<alarm>[,alarm...] <regexp>--not-log-alarmโ skips the specified alarm when a log line matches the regexp you gave, syntax:<alarm>[,alarm...] <regexp>(the hater version)--not-alarm-logโ skips the specified alarm when a log line matches the regexp you gave, syntax:<alarm>[,alarm...] <regexp>--alarm-listโ lists every enabled alarm โจ--alarms-listโ lists every enabled alarm (plural gang)--alarm-msg-sizeโ sets the max size of an alarm message (default8192)
--log-masterโ delegates logging to the master process ๐--log-master-bufsizeโ sets the buffer size for the master logger. bigger log messages will get truncated bestie, so size accordingly--log-master-streamโ creates the master logpipe asSOCK_STREAM--log-master-req-streamโ creates the master requests logpipe asSOCK_STREAM--log-reopenโ reopens the log after a reload ๐--log-truncateโ truncates the log on startup--log-maxsizeโ sets the maximum logfile size--log-backupnameโ sets the logfile name used after rotation--logdateโ prefixes logs with a date, or with astrftimestring--log-dateโ prefixes logs with a date, or with astrftimestring--log-prefixโ prefixes logs with a string you choose
--log-zeroโ logs responses that have no body--log-slowโ logs requests slower than the number of milliseconds you specify ๐--log-4xxโ logs requests with a4xxresponse--log-5xxโ logs requests with a5xxresponse--log-bigโ logs requests bigger than the size you specify--log-sendfileโ logs sendfile requests--log-ioerrorโ logs requests with io errors--log-microsโ reports response time in microseconds instead of milliseconds โฑ๏ธ--log-x-forwarded-forโ uses the ip from theX-Forwarded-Forheader instead ofREMOTE_ADDR
--master-as-rootโ leaves the master process running as root ๐--drop-after-initโ runs the privileges drop after plugin initialization, and it's superseded bydrop-after-apps--drop-after-appsโ runs the privileges drop after apps loading, and it's superseded bymaster-as-root--force-cwdโ forces the initial working directory to the value you specify--binshโ overrides/bin/sh(this is what exec hooks use, and it always falls back to/bin/sh)--chdirโchdirs to the specified directory before apps loading--chdir2โchdirs to the specified directory after apps loading
--lazyโ sets lazy mode (apps load in the workers instead of the master) ๐ด--lazy-appsโ loads apps in each worker instead of the master--cheapโ sets cheap mode (workers only spawn after the first request) ๐ช--cheaperโ sets cheaper mode (adaptive process spawning)--cheaper-initialโ sets the initial number of processes to spawn in cheaper mode--cheaper-algoโ picks the algorithm used for adaptive process spawning--cheaper-stepโ the number of additional processes to spawn at each overload--cheaper-overloadโ increases workers after the overload you specify--cheaper-algo-listโ lists the enabled cheapers algorithms--cheaper-algos-listโ lists the enabled cheapers algorithms--cheaper-listโ lists the enabled cheapers algorithms--cheaper-rss-limit-softโ doesn'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, it tries to stop workers ๐--idleโ sets idle mode (puts uWSGI into cheap mode after inactivity)--die-on-idleโ shuts uWSGI down when idle ๐
--mountโ loads an application under a mountpoint--worker-mountโ loads an application under a mountpoint in the specified worker, or after workers spawn--threadsโ runs each worker in prethreaded mode with the number of threads you specify ๐งต--thread-stacksizeโ sets the threads stacksize--threads-stacksizeโ sets the threads stacksize--thread-stack-sizeโ sets the threads stacksize--threads-stack-sizeโ sets the threads stacksize
four names, one stacksize. they all do the exact same thing, bestie, go wild ๐ธ
--vhostโ enables virtualhosting mode (it keys off theSERVER_NAMEvariable)--vhost-hostโ enables virtualhosting mode (it keys off theHTTP_HOSTvariable)
--routeโ adds a route--route-hostโ adds a route based on theHostheader--route-uriโ adds a route based onREQUEST_URI--route-qsโ adds a route based onQUERY_STRING--route-remote-addrโ adds a route based onREMOTE_ADDR--route-user-agentโ adds a route based onHTTP_USER_AGENT--route-remote-userโ adds a route based onREMOTE_USER--route-refererโ adds a route based onHTTP_REFERER--route-labelโ adds a routing label (for use withgoto) ๐ท๏ธ--route-ifโ adds a route based on a condition--route-if-notโ adds a route based on a condition (the negate version)--route-runโ always runs the route action you specify
--final-routeโ adds a final route--final-route-statusโ adds a final route for the status you specify--final-route-hostโ adds a final route based on theHostheader--final-route-uriโ adds a final route based onREQUEST_URI--final-route-qsโ adds a final route based onQUERY_STRING--final-route-remote-addrโ adds a final route based onREMOTE_ADDR--final-route-user-agentโ adds a final route based onHTTP_USER_AGENT--final-route-remote-userโ adds a final route based onREMOTE_USER--final-route-refererโ adds a final route based onHTTP_REFERER--final-route-labelโ adds a final routing label (for use withgoto) ๐ท๏ธ--final-route-ifโ adds a final route based on a condition--final-route-if-notโ adds a final route based on a condition (the negate version)--final-route-runโ always runs the final route action you specify
--error-routeโ adds an error route--error-route-statusโ adds an error route for the status you specify--error-route-hostโ adds an error route based on theHostheader--error-route-uriโ adds an error route based onREQUEST_URI--error-route-qsโ adds an error route based onQUERY_STRING--error-route-remote-addrโ adds an error route based onREMOTE_ADDR--error-route-user-agentโ adds an error route based onHTTP_USER_AGENT--error-route-remote-userโ adds an error route based onREMOTE_USER--error-route-refererโ adds an error route based onHTTP_REFERER--error-route-labelโ adds an error routing label (for use withgoto) ๐ท๏ธ--error-route-ifโ adds an error route based on a condition--error-route-if-notโ adds an error route based on a condition (the negate version)--error-route-runโ always runs the error route action you specify
--response-routeโ adds a response route--response-route-statusโ adds a response route for the status you specify--response-route-hostโ adds a response route based on theHostheader--response-route-uriโ adds a response route based onREQUEST_URI--response-route-qsโ adds a response route based onQUERY_STRING--response-route-remote-addrโ adds a response route based onREMOTE_ADDR--response-route-user-agentโ adds a response route based onHTTP_USER_AGENT--response-route-remote-userโ adds a response route based onREMOTE_USER--response-route-refererโ adds a response route based onHTTP_REFERER--response-route-labelโ adds a response routing label (for use withgoto) ๐ท๏ธ--response-route-ifโ adds a response route based on a condition--response-route-if-notโ adds a response route based on a condition (the negate version)--response-route-runโ always runs the response route action you specify
--router-listโ lists the enabled routers ๐ฃ๏ธ--routers-listโ lists the enabled routers
--error-page-403โ adds an error page (html) for the managed403response--error-page-404โ adds an error page (html) for the managed404response--error-page-500โ adds an error page (html) for the managed500response
--websockets-ping-freqโ sets the frequency (in seconds) of websockets automatic ping packets ๐--websocket-ping-freqโ sets the frequency (in seconds) of websockets automatic ping packets--websockets-pong-toleranceโ sets the tolerance (in seconds) of the websockets ping/pong subsystem--websocket-pong-toleranceโ sets the tolerance (in seconds) of the websockets ping/pong subsystem--websockets-max-sizeโ sets the max allowed size of websocket messages (in Kbytes, default1024)--websocket-max-sizeโ sets the max allowed size of websocket messages (in Kbytes, default1024)
--chunked-input-limitโ sets the max size of a chunked input part (default1MB, in bytes)--chunked-input-timeoutโ sets the default timeout for chunked input
--clockโ sets a clock source ๐--clock-listโ lists the enabled clocks--clocks-listโ lists the enabled clocks
--add-headerโ automatically adds HTTP headers to the response โจ--rem-headerโ automatically removes the specified HTTP header from the response--del-headerโ automatically removes the specified HTTP header from the response--collect-headerโ stores the specified response header in a request var, syntax:<header> <var>--response-header-collectโ stash the response header you name into a request var (syntax:header var) ๐--pull-headerโ same energy as above but it also yeets that header out of the response entirely (syntax:header var) โจ
๐ static file serving, the whole saga ๐
--check-staticโ peek for static files inside the directory you give it--check-static-docrootโ peek for static files in the requestedDOCUMENT_ROOT--static-checkโ peek for static files in the directory you give it (yes bestie, same vibe as--check-static)--static-mapโ map a mountpoint to a static directory (or file)--static-map2โ likestatic-mapbut it fully appends the requested resource to the docroot--static-skip-extโ skip the extension you specify when doing staticfile checks--static-indexโ go look for the file you name if a directory is what got requested--static-safeโ skip security checks when the file lives under the path you specify--static-cache-pathsโ drop resolved paths into the uWSGI cache for however many seconds you say--static-cache-paths-nameโ use the cache you name for 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) (the same thing, spelled cuter)--static-expires-typeโ set theExpiresheader based on content type--static-expires-type-mtimeโ set theExpiresheader based on content type and file mtime--static-expiresโ set theExpiresheader based on a filename regexp--static-expires-mtimeโ set theExpiresheader based on a filename regexp and file mtime--static-expires-uriโ set theExpiresheader based on aREQUEST_URIregexp--static-expires-uri-mtimeโ set theExpiresheader based on aREQUEST_URIregexp and file mtime--static-expires-path-infoโ set theExpiresheader based on aPATH_INFOregexp--static-expires-path-info-mtimeโ set theExpiresheader based on aPATH_INFOregexp and file mtime--static-gzipโ if your regexp matches the static file translation, it'll go hunting for a gzip version ๐ธ--static-gzip-allโ check for a gzip version of literally every requested static file--static-gzip-dirโ check for a gzip version of all requested static files in the dir/prefix you specify--static-gzip-prefixโ check for a gzip version of all requested static files in the dir/prefix you specify (twin flame of the one above ๐ )--static-gzip-extโ check for a gzip version of all requested static files with the ext/suffix you give--static-gzip-suffixโ check for a gzip version of all requested static files with the ext/suffix you give (again, same but different name, iykyk)--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) (singular edition, same deal)--file-serve-modeโ set the static file serving mode--fileserve-modeโ set the static file serving mode (no hyphen, same mode)--disable-sendfileโ disablesendfile()and go rely on boringread()/write()๐ญ--check-cacheโ check for response data in the cache you specify (leave it empty for the default cache)--close-on-execโ set close-on-exec on connection sockets (might be required for spawning processes in requests)--close-on-exec2โ set close-on-exec on server sockets (might be required for spawning processes in requests)
๐ฆ modes, env, and other little rituals ๐ฆ
--modeโ set uWSGI custom mode--envโ set environment variable--envdirโ load a daemontools compatible envdir--early-envdirโ load a daemontools compatible envdir ASAP--unenvโ unset environment variable--vacuumโ try to remove all of the generated file/sockets ๐งน--file-writeโ write the content you specify to the file you specify (syntax:file=value) before privileges drop--cgroupโ put the processes in the cgroup you name--cgroup-optโ set a value in the cgroup option you name--cgroup-dir-modeโ set permission for the cgroup directory (default is700)--namespaceโ run in a new namespace under the rootfs you specify--namespace-keep-mountโ keep the mountpoint you specify in your namespace--nsโ run in a new namespace under the rootfs you specify (short lil alias ๐)--namespace-netโ add network namespace--ns-netโ add network namespace--enable-proxy-protocolโ enable PROXY1 protocol support (only for http parsers)--reuse-portโ enable theREUSE_PORTflag on the socket (BSD only, bestie, don't come for me)--tcp-fast-openโ enable theTCP_FASTOPENflag on TCP sockets with the qlen value you give--tcp-fastopenโ enable theTCP_FASTOPENflag on TCP sockets with the qlen value you give (hyphen walked so this could run โจ)--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 (same, no hyphen)--zergโ attach to a zerg server ๐--zerg-fallbackโ fallback 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 (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 legion you specify ๐--cron-legionโ add a cron task that only runs when the instance is a lord of the legion you specify--unique-legion-cronโ add a unique cron task that only runs when the instance is a lord of the legion you specify--unique-cron-legionโ add a unique cron task that only runs when the instance is a lord of the legion you specify--loopโ select the uWSGI loop engine--loop-listโ list enabled loop engines--loops-listโ list enabled loop engines (plural, same list)--worker-execโ run the command you specify as a worker--worker-exec2โ run the command you specify as a 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); 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โ theattach-daemonkeyval variant (supports smart modes too)--pluginsโ load uWSGI plugins ๐--pluginโ load uWSGI plugins--need-pluginsโ load uWSGI plugins (exit on error)--need-pluginโ load uWSGI plugins (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 (you get the pattern by now, bestie ๐ )--autoloadโ try to automatically load plugins when unknown options show up--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 response header maximum size (default:64k)
๐ python options, the moment you've been waiting for ๐
--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โ add a directory (or glob) to pythonpath--python-pathโ add a directory (or glob) to pythonpath--ppโ add a directory (or glob) to pythonpath (the short lil king ๐)--pymodule-aliasโ add a python alias module--post-pymodule-aliasโ add 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โ bestie, this one imports a python module in the spooler โจ--spooler-pyimportโ same energy, imports a python module in the spooler ๐--spooler-py-importโ yes it's the same thing again, imports a python module in the spooler ๐ซถ--spooler-python-importโ the fourth twin!! also imports a python module in the spooler ๐
four spellings, one job, we love an alias moment ๐ฆ
--pyargvโ manually setsys.argv. you're the one writing the script's origin story now, no cap ๐-O,--optimizeโ set python optimization level โก--pecanโ load a pecan config file ๐ฅง--pasteโ load apaste.deployconfig file ๐ธ--paste-loggerโ enable pastefileConfiglogger ๐--web3โ load a web3 app ๐ฅ--pumpโ load a pump app ๐ช--wsgi-liteโ load a wsgi-lite app ๐ชถ--ini-pasteโ load apaste.deployconfig file containing auwsgisection ๐--ini-paste-loggedโ load apaste.deployconfig file containing auwsgisection, and load the loggers too ๐๏ธ--reload-os-envโ force reload ofos.environat each request ๐ฎโ๐จ literally every single request, she's thorough--no-siteโ do not import thesitemodule ๐ซ--pyshellโ run an interactive python shell in the uWSGI environment ๐ so iconic--pyshell-oneshotโ run an interactive python shell in the uWSGI environment, but the one-shot variant ๐ฏ--pythonโ run a python script in the uWSGI environment ๐--pyโ run a python script in the uWSGI environment (short king version) ๐--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, bestie. this is not a production girlie ๐
--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 the auto-reload scan. can be specified multiple times, so go off, list as many as you want ๐โจ--wsgi-env-behaviourโ set the strategy for allocating/deallocating the WSGI env ๐ง--wsgi-env-behaviorโ set the strategy for allocating/deallocating the WSGI env (american spelling said hi) ๐บ๐ธ--start_response-nodelayโ send WSGI http headers as soon as possible
heads up, this is a PEP violation โ ๏ธ iconic of her honestly
--wsgi-strictโ try to be fully PEP compliant by 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 (plural edition, same vibes) ๐งบ๐งบ--wsgi-disable-file-wrapperโ disable thewsgi.file_wrapperfeature ๐ซ๐ฆ--python-versionโ report python version ๐ข--python-rawโ load a python file for managing raw requests ๐ชต--py-sharedareaโ create a sharedarea from a pythonbytearrayobject of the specified size ๐งฉ--py-call-osafterforkโ enable child processes running cpython to trap OS signals ๐ชค--python-worker-overrideโ override worker with the specified python script ๐--py-executableโ overridesys.executablevalue ๐ ๏ธ--py-sys-executableโ overridesys.executablevalue (same thing, different name, we love a duo) ๐ ๏ธ๐ ๏ธ
and that's a wrap on the whole page, bestie!! ๐ you just read the manual for uwsgi_python310, version 2.0.20-debian, dated March 2022 โ go forth, run your python, and remember: no auto-reload in production, that's the rule ๐โจ๐ฆ
๐ฆ where this page comes from
- ubuntu jammy: uwsgi-plugin-python3 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