UWSGI_MONO(1)
๐ UWSGI_MONO ๐
okay bestie, welcome to the manual page for uwsgi_mono โ she's a User Command, she lives in section 1, and she is that girl. buckle up, this page is long and we are doing it in parts. ๐
โจ NAME โจ
uwsgi_mono โ fast (pure C), self-healing, developer-friendly WSGI server ๐
like. she's written in pure C. she heals herself. she's developer-friendly. the trinity. no cap.
๐ฆ SYNOPSIS ๐ฆ
uwsgi-core-local [options...]
that's it. that's the whole summoning ritual. you give her options, she gives you a server. periodt. โจ
๐ธ DESCRIPTION ๐ธ
okay so this is the big one โ every single option, flag, and knob she has. grab a snack, we're going section by section. ๐
๐ SOCKETS AND PROTOCOLS
-s,--socketโ bind to the specified UNIX/TCP socket using default protocol-s,--uwsgi-socketโ bind to the specified UNIX/TCP socket using uwsgi protocol--suwsgi-socketโ bind to the specified UNIX/TCP socket using uwsgi protocol over SSL ๐--ssl-socketโ bind to the specified UNIX/TCP socket using uwsgi protocol over SSL--http-socketโ bind to the specified UNIX/TCP socket using HTTP protocol--http-socket-modifier1โ force the specified modifier1 when using HTTP protocol--http-socket-modifier2โ force the specified modifier2 when using HTTP protocol--http11-socketโ bind to the specified UNIX/TCP socket using HTTP 1.1 (Keep-Alive) protocol--https-socketโ bind to the specified UNIX/TCP socket using HTTPS protocol--https-socket-modifier1โ force the specified modifier1 when using HTTPS protocol--https-socket-modifier2โ force the specified modifier2 when using HTTPS protocol--fastcgi-socketโ bind to the specified UNIX/TCP socket using FastCGI protocol--fastcgi-nph-socketโ bind to the specified UNIX/TCP socket using FastCGI protocol (nph mode)--fastcgi-modifier1โ force the specified modifier1 when using FastCGI protocol--fastcgi-modifier2โ force the specified modifier2 when using FastCGI protocol--scgi-socketโ bind to the specified UNIX/TCP socket using SCGI protocol--scgi-nph-socketโ bind to the specified UNIX/TCP socket using SCGI protocol (nph mode)--scgi-modifier1โ force the specified modifier1 when using SCGI protocol--scgi-modifier2โ force the specified modifier2 when using SCGI protocol--raw-socketโ bind to the specified UNIX/TCP socket using RAW protocol--raw-modifier1โ force the specified modifier1 when using RAW protocol--raw-modifier2โ force the specified modifier2 when using RAW protocol--puwsgi-socketโ bind to the specified UNIX/TCP socket using persistent uwsgi protocol (puwsgi)--protocolโ force the specified protocol for default sockets--socket-protocolโ force the specified protocol for default sockets--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 AND THE HARAKIRI ZONE
-p,--processesโ spawn the specified number of workers/processes-p,--workersโ spawn the specified number of workers/processes--thunder-lockโ serialize accept() usage (if possible)-t,--harakiriโ set harakiri timeout--harakiri-verboseโ enable verbose mode for harakiri--harakiri-graceful-timeoutโ interval between graceful harakiri attempt and a sigkill--harakiri-graceful-signalโ use this signal instead of sigterm for graceful harakiri attempts--harakiri-queue-thresholdโ only trigger harakiri if queue is greater than this threshold--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
harakiri is literally the app-killing timeout bestie. three whole spellings for the same after-request-hook behaviour, she contains multitudes ๐
๐ CONFIG LOADING
-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 is 1--strictโ enable strict mode (placeholder cannot be used)--skip-zeroโ skip check of file descriptor 0--skip-atexitโ skip atexit hooks (ignored by the master)--skip-atexit-teardownโ skip atexit teardown (ignored by the master)-S,--setโ set a placeholder or an option--set-placeholderโ set a placeholder--set-phโ set a placeholder--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)--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)
๐ง 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 from 1)--for-readlineโ (opt logic) for cycle (expand the specified file to a list of lines)--endforโ (opt logic) end for cycle--end-forโ (opt logic) end for cycle--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
the way she has like four aliases for every single condition?? she's giving convenience, she's giving "pick your fave spelling" ๐
โ LISTS AND FILTERING
--blacklistโ set options blacklist context--end-blacklistโ clear options blacklist context--whitelistโ set options whitelist context--end-whitelistโ clear options whitelist context
๐ญ WRITE ERRORS AND SIGNALS (the annoying ones)
--ignore-sigpipeโ do not report (annoying) SIGPIPE--ignore-write-errorsโ do not report (annoying) write()/writev() errors--write-errors-toleranceโ set the maximum number of allowed write errors (default: no tolerance)--write-errors-exception-onlyโ only raise an exception on write errors giving control to the app itself--disable-write-exceptionโ disable exception generation on write()/writev()
default is no tolerance bestie. zero. none. she will not be ignoring your write errors unless you literally tell her to. ๐ฅ
๐ DAEMON AND INSTANCE MANAGEMENT
-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
โ๏ธ CORE TUNING
-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
๐ SOCKET OWNERSHIP AND PERMISSIONS
-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 AND PROCESS NAMES
-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
๐ APP LOADING AND THE MASTER
-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 (her royal era)
--emperorโ run the Emperor--emperor-proxy-socketโ force the vassal to became an Emperor proxy--emperor-wrapperโ set a binary wrapper for vassals--emperor-wrapper-overrideโ set a binary wrapper for vassals to try before the default one--emperor-wrapper-fallbackโ set a binary wrapper for vassals to try as a last resort--emperor-nofollowโ do not follow symlinks when checking for mtime--emperor-procnameโ set the Emperor process name--emperor-freqโ set the Emperor scan frequency (default 3 seconds)--emperor-required-heartbeatโ set the Emperor tolerance about heartbeats--emperor-curse-toleranceโ set the Emperor tolerance about cursed vassals--emperor-pidfileโ write the Emperor pid in the specified file
the Emperor scans every 3 seconds by default and she is not following your symlinks unless you say otherwise. main character energy fr fr ๐
--emperor-tyrantโ flips the Emperor into Tyrant mode ๐ the vassals are NOT gonna like this one bestie--emperor-tyrant-nofollowโ in Tyrant mode, don't follow symlinks when it's checking for uid/gid. no sneaky link-following ๐ซ--emperor-statsโ run the Emperor stats server โจ numbers go brrr--emperor-stats-serverโ same thing, same energy, run the Emperor stats server ๐--early-emperorโ spawn the emperor as soon as possibile (yes, that's the original spelling, I'm not touching it ๐ )--emperor-broodlordโ run the emperor in BroodLord mode ๐ฆ it's giving main character boss energy fr fr--emperor-throttleโ set the throttling level (in milliseconds) for bad behaving vassals, default1000โฑ๏ธ misbehave and you get slowed down, periodt--emperor-max-throttleโ set the max throttling level (in milliseconds) for bad behaving vassals, default is 3 minutes ๐ค the ceiling of the time-out zone--emperor-magic-execโ prefixes vassals' config files withexec://if they have the executable bit set ๐ช--emperor-on-demand-extensionโ search for a text file (vassal name + extension) containing the on demand socket name ๐--emperor-on-demand-extโ literally the same: search for a text file (vassal name + extension) holding the on demand socket name ๐--emperor-on-demand-directoryโ enables on demand mode, binding to the unix socket in the specified directory, named like the vassal +.socket๐ง--emperor-on-demand-dirโ same deal: enable on demand mode binding to the unix socket in the specified directory named like the vassal +.socketโจ--emperor-on-demand-execโ uses 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โ yep, same: allows the specified extension in the Emperor (vassal called with--config) ๐--emperor-no-blacklistโ disables the Emperor blacklisting subsystem ๐ no more naughty list--emperor-use-cloneโ useclone()instead offork(), passing the specifiedunshare()flags ๐งฌ--emperor-graceful-shutdownโ use vassals graceful shutdown during ragnarok ๐ because even the end of the world deserves manners--emperor-capโ set vassals capability ๐--vassals-capโ set vassals capability (same thing, different flag, iconic) ๐--vassal-capโ set vassals capability (yes bestie, a third spelling, we love options) ๐--imperial-monitor-listโ list enabled imperial monitors ๐--imperial-monitors-listโ list enabled imperial monitors (the plural sibling ๐ )--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 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 twin โจ)--heartbeatโ announce healthiness to the emperor ๐ "not dead yet bestie!"--reload-mercyโ set the max time (in seconds) we wait for workers and other processes to die during reload/shutdown ๐ฐ๏ธ--worker-reload-mercyโ set the max time (in seconds) a worker can take to reload/shutdown, default is60๐ฎโ๐จ--mule-reload-mercyโ set the max time (in seconds) a mule can take to reload/shutdown, default is60๐ด--exit-on-reloadโ force exit even if a reload is requested ๐ช bye--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 (same flag, same help, we're consistent here) ๐--print-symโ print content of the specified binary symbol ๐--print-symbolโ print content of the specified binary symbol (the long-form twin ๐ )-r|--reaperโ callwaitpid(-1,...)after each request to get rid of zombies ๐ง no cap, zombie apocalypse cancelled-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 ๐ซ they stay-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 vibe, other order ๐)--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, default is3seconds ๐งน--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โ update thelast_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) โจ gen 2 slay--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 the 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 king ๐ )--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 twin ๐)--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_root and put_old must be separated with a space) ๐--pivot_rootโpivot_root()to the specified directories (new_root and put_old must be separated with a space) ๐ same thing, underscore edition--uidโ setuid to the specified user/uid ๐ชช--gidโ setgid to the specified group/gid ๐ชช--add-gidโ add the specified group id to the process credentials โ--immediate-uidโ setuid to the specified user/uid IMMEDIATELY โก--immediate-gidโ setgid to 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 โญ๏ธ (the short twin ๐)--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. super handy for jailing systems ๐--re-forkโ same thing as--refork,fork()again after privileges drop. useful for jailing systems.--refork-as-rootโfork()again before privileges drop. also for jailing systems, bestie ๐ซถ--re-fork-as-rootโfork()again before privileges drop. for jailing systems.--refork-post-jailโfork()again after jailing. jailing systems, you know the vibe ๐--re-fork-post-jailโfork()again after jailing. for jailing systems.
๐ hooks: the "run this at exactly this moment" section ๐
okay so these are all --hook-* and they're literally just when do you want your hook to fire. the timing IS the option. iconic honestly โจ
--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)--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 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
๐ the exec twins ๐
same timeline, but instead of a hook you're running a whole command. fr fr.
--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 / umount: filesystem chaos, but scheduled ๐
mounting and unmounting at the exact right life stage. no cap, this is so useful.
--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
โญ waiting era: patience is a virtue โญ
--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--wait-for-fsโ wait for the specified filesystem item to appear before running root hooks--wait-for-fileโ wait for the specified file to appear before running root hooks--wait-for-dirโ wait for the specified directory to appear before running root hooks--wait-for-mountpointโ wait for the specified mountpoint to appear before running root hooks--wait-for-fs-timeoutโ set the timeout forwait-for-fs/file/dir--wait-for-socketโ wait for the specified socket to be ready before loading apps--wait-for-socket-timeoutโ set the timeout forwait-for-socket
๐ฆ call section (yes it's the same timeline again, but with functions) ๐ฆ
--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
bestie watch the arity ๐ โ--call-as-vassalvs--call-as-vassal1vs--call-as-vassal3, and--call-as-emperorvs1vs2vs4โ the number literally tells you how many args the function takes. get the signature wrong and it's giving undefined behaviour. ๐
๐ config loading era ๐
--iniโ load config from ini file-y,--yamlโ load config from yaml file-y,--ymlโ load config from yaml file-j,--jsonโ load config from json file-j,--jsโ load config from json file
โจ instance & mode vibes โจ
--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
๐ฅ socket tuning, my beloved ๐ฅ
--no-defer-acceptโ disable deferred-accept on sockets--tcp-nodelayโ enable TCPNODELAYon each request--so-keepaliveโ enable TCPKEEPALIVEs--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
๐ memory & reload limits (the intense part) ๐
--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 LinuxKSM--pcre-jitโ enable pcre jit (if available)--never-swapโ lock all memory pages avoiding swapping
๐ธ touch: the file watcher era ๐ธ
poke a file, trigger a thing. the way that works is so satisfying honestly.
--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โ the moment that filesystem object you picked gets touched? graceful reload. clocked it, did it, no drama ๐--fs-brutal-reloadโ same energy but make it brutal: filesystem object changes, instance gets the hard reload. no gentle goodbyes.--fs-signalโ raise a uwsgi signal when the filesystem object changes. syntax:file signalโ yes bestie, both of them.--check-mountpointโ if a filesystem dips and stops being reachable, this literally destroys the instance. v useful for reliable Fuse management. it's giving "if you can't find home, nobody gets home" ๐ญ--mountpoint-checkโ same thing, same destruction, different spelling. destroy the instance if a filesystem is no more reachable (great for reliable Fuse management).--check-mountโ you guessed it: destroy the instance when a filesystem is no longer reachable. Fuse stays reliable, periodt.--mount-checkโ fourth alias of the same vibe: unreachable filesystem โ instance destroyed. reliable Fuse management stays winning.--propagate-touchโ this is the over-engineering option for systems with flaky signal management. sometimes you just gotta over-engineer, iykyk ๐ซถ--limit-postโ cap that request body. limit request body, that's it, that's the whole thing.--no-orphansโ if the master dies, workers get auto-killed too. heads up tho: this can be dangerous for availability. dramatic but true ๐--prioโ set processes/threads priority.--cpu-affinityโ set cpu affinity. tell those processes where to live.--post-bufferingโ set size in bytes after which it'll buffer to disk instead of memory. memory is a vibe but disk is forever โจ--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 it starts printing a warning at you.--upload-progressโ enable creation of.jsonfiles in the specified directory during a file upload. watch it go ๐--no-default-appโ do not fallback to default app. no safety net, no backup plan, we ball.--manage-script-nameโ automatically rewriteSCRIPT_NAMEandPATH_INFO. let it handle the naming, it's better at it than you.--ignore-script-nameโ ignoreSCRIPT_NAME. pretend it's not even there.--catch-exceptionsโ report exception as http output. discouraged, bestie โ use only for testing. do NOT ship this.--reload-on-exceptionโ reload a worker when an exception is raised. worker said "I'm out" and it means it.--reload-on-exception-typeโ reload a worker when a specific exception type is raised. picky reloading, we love specificity.--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. someone to catch the chaos ๐ง--enable-metricsโ enable metrics subsystem. numbers, but make it fashion.--metricโ add a custom metric. yours, your design.--metric-thresholdโ add a metric threshold/alarm.--metric-alarmโ add a metric threshold/alarm.--alarm-metricโ add a metric threshold/alarm. (three names, one job, iconic)--metrics-dirโ export metrics as text files to the specified directory.--metrics-dir-restoreโ restore last value taken from the metrics dir. memory restored, main character energy ๐--metric-dirโ export metrics as text files to the specified directory. (same deal, shorter name)--metric-dir-restoreโ restore last value taken from the metrics dir.--metrics-no-coresโ disable generation of cores-related metrics. no cores, no metrics, no problem.--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 thing, alternate spelling bestie.--stats-httpโ prefix stats server json output with http headers.--stats-minifiedโ minify statistics json output. smaller json, same truth โจ--stats-minโ minify statistics json output. (yes it's the alias, no we're not sorry)--stats-pushโ push the stats json to the specified destination. send it ๐ค--stats-pusher-default-freqโ set the default frequency of stats pushers.--stats-pushers-default-freqโ set the default frequency of stats pushers. (plural, same function)--stats-no-coresโ disable generation of cores-related stats.--stats-no-metricsโ do not include metrics in stats output. metrics stay home.--multicastโ subscribe to specified multicast group.--multicast-ttlโ set multicast ttl.--multicast-loopโ set multicast loop (default1).--master-fifoโ enable the master fifo. the master gets a lil communication tube ๐--notify-socketโ enable the notification socket.--subscription-notify-socketโ set the notification socket for subscriptions.--legionโ became a member of a legion. we're building an army, fr fr ๐--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โ if one of the lord hooks fails, declare itself as a dead node for the specified amount of seconds. dramatic? yes. effective? also yes.--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). rip ๐ญ--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. signatures verified, trust established ๐ซถ--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. special permission slip, just for that uid.--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. (short king option name)--subscribeโ subscribe to the specified subscription server.--subscribe2โ subscribe to the specified subscription server using advanced keyval syntax. glow-up version โจ--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. no lingering subscriptions, we're clean here ๐--start-unsubscribedโ configure subscriptions but do not send them (useful with master fifo). set it up, don't press send.--subscribe-with-modifier1โ force the specififed modifier1 when subscribing.--snmpโ enable the embedded snmp server.--snmp-communityโ set the snmp community string.--ssl-verboseโ be verbose about SSL errors. spill the tea, ssl ๐--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. on-demand context creation, so efficient.--sni-dir-ciphersโ set ssl ciphers for sni-dir option.--ssl-enable3โ enable SSLv3 (insecure). bestie. no. but here's the flag anyway.--ssl-enable-sslv3โ enable SSLv3 (insecure). same warning, same yikes.--ssl-enable-tlsv1โ enable TLSv1 (insecure). the vibes are bad on this one, keep it noted.--ssl-optionโ set a raw ssl option (numeric value).--sni-regexpโ add an SNI-governed SSL context (the key is a regexp). regexp said "I'll handle the matching" ๐ง--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. everyone take a lil nap, please ๐ญ--binary-pathโ force binary path.--privileged-binary-patchโ patch the uwsgi binary with a new command (before privileges drop).--unprivileged-binary-patchโ patch the uwsgi binary with a new command (after privileges drop).--privileged-binary-patch-argโ patch the uwsgi binary with a new command and arguments (before privileges drop).--unprivileged-binary-patch-argโ patch the uwsgi binary with a new command and arguments (after privileges drop).--asyncโ enable async mode with specified cores.--max-fdโ set maximum number of file descriptors (requires root privileges).--logtoโ set logfile/udp address.--logto2โ log to specified file or udp address after privileges drop. the sequel ๐ฌ--log-formatโ set advanced format for request logging.--logformatโ set advanced format for request logging. (same, minus the dash)--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. (yes, the name got flipped, it's still the same job)--loggerโ set/append a logger.--logger-listโ list enabled loggers. roll call ๐--loggers-listโ list enabled loggers.--threaded-loggerโ offload log writing to a thread. delegating, as one does ๐--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. those lines? never happened ๐--log-filterโ show only log lines matching the specified regexp. curated feed, only the best.--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. budget-friendly alarm, lowkey genius.
okay bestie we are still in the options, this list is literally never-ending and honestly? obsessed ๐ here's the next chunk, no skips, no shortcuts, every single flag accounted for ๐ซถ
--alarm-freqโ tunes the anti-loop alarm system (default 3 seconds)--alarm-fdโ raises the alarm you name whenever an fd is read for read; by default it reads 1 byte, so set 8 if you're dealing with eventfd โจ--alarm-segfaultโ fires the alarm you specify when the segmentation fault handler runs ๐ญ--segfault-alarmโ fires the alarm you specify when the segmentation fault handler runs (yep, same words, it's giving twin energy ๐)--alarm-backlogโ fires the alarm you specify when the socket backlog queue is full ๐ฅ--backlog-alarmโ fires the alarm you specify when the socket backlog queue is full ๐ธ--lq-alarmโ fires the alarm you specify when the socket backlog queue is full ๐--alarm-lqโ fires the alarm you specify when the socket backlog queue is full โจ--alarm-listen-queueโ fires the alarm you specify when the socket backlog queue is full ๐--listen-queue-alarmโ fires the alarm you specify when the socket backlog queue is full ๐--log-alarmโ fires the alarm you name whenever a log line matches your regexp; syntax:<alarm>[,alarm...] <regexp>--alarm-logโ fires the alarm you name whenever a log line matches your regexp; syntax:<alarm>[,alarm...] <regexp>--not-log-alarmโ skips the alarm you name when a log line matches your regexp; syntax:<alarm>[,alarm...] <regexp>๐--not-alarm-logโ skips the alarm you name when a log line matches your regexp; syntax:<alarm>[,alarm...] <regexp>--alarm-listโ lists all the enabled alarms ๐--alarms-listโ lists all the enabled alarms ๐--alarm-msg-sizeโ sets the max size of an alarm message (default 8192)--log-masterโ delegates the logging to the master process ๐--log-master-bufsizeโ sets the buffer size for the master logger; anything bigger gets truncated, so watch out โ ๏ธ--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 to use after rotation--logdateโ prefixes logs with the date, or with astrftimestring ๐--log-dateโ prefixes logs with the date, or with astrftimestring ๐--log-prefixโ prefixes logs with a string of your choosing--log-zeroโ logs responses that have no body--log-slowโ logs any request slower than the number of milliseconds you give โฑ๏ธ--log-4xxโ logs requests with a 4xx response--log-5xxโ logs requests with a 5xx response--log-bigโ logs requests bigger than the size you specify--log-sendfileโ logs sendfile requests ๐ฆ--log-ioerrorโ logs requests that hit 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 ๐ (big power, handle with care)--drop-after-initโ runs the privileges drop after plugin initialization; superseded bydrop-after-apps--drop-after-appsโ runs the privileges drop after apps loading; superseded bymaster-as-root--force-cwdโ forces the initial working directory to the value you specify--binshโ overrides/bin/sh(it's what the 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 (loads apps in the workers instead of the master)--lazy-appsโ loads apps in each worker instead of the master--cheapโ sets cheap mode (workers only get spawned after the very first request ๐ธ)--cheaperโ sets cheaper mode (that's the adaptive process spawning one)--cheaper-initialโ sets how many processes to spawn at the start in cheaper mode--cheaper-algoโ picks which algorithm gets used for the adaptive process spawning ๐ง--cheaper-stepโ how many extra 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โ won't spawn new workers if the total resident memory usage of all workers is above this limit ๐--cheaper-rss-limit-hardโ if the total workers resident memory usage is above this, it tries to stop workers ๐ฌ--idleโ sets idle mode (puts uWSGI back into cheap mode after some inactivity)--die-on-idleโ shuts uWSGI down when it goes idle ๐--mountโ loads an application under a mountpoint--worker-mountโ loads an application under a mountpoint in the worker you name, 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--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, but 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, 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, 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, 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 managed 403 response--error-page-404โ adds an error page (html) for the managed 404 response--error-page-500โ adds an error page (html) for the managed 500 response--websockets-ping-freqโ sets how often (in seconds) websockets automatic ping packets go out ๐--websocket-ping-freqโ sets how often (in seconds) websockets automatic ping packets go out ๐--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, default 1024)--websocket-max-sizeโ sets the max allowed size of websocket messages (in Kbytes, default 1024)--chunked-input-limitโ sets the max size of a chunked input part (default 1MB, 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 your response ๐
and bestieโฆ we are STILL not done, the options keep coming, stay with me ๐ง
--rem-headerโ auto-yeets a specified HTTP header off the response, no cap ๐--del-headerโ same energy as--rem-header: automatically removes the specified HTTP header from the response--collect-headerโ stashes the specified response header into a request var (syntax:header var) ๐--response-header-collectโ also stashes the specified response header into a request var (syntax:header var)--pull-headerโ stashes the specified response header in a request var and rips it out of the response (syntax:header var)--check-staticโ looks for static files in the directory you give it ๐ฆ--check-static-docrootโ looks for static files in the requestedDOCUMENT_ROOT--static-checkโ looks for static files in the specified directory (yes bestie, it's the same vibe as--check-static)--static-mapโ maps a mountpoint to a static directory (or a single file)--static-map2โ like--static-mapexcept it completely appends the requested resource onto the docroot โจ--static-skip-extโ skips the specified extension when it's doing staticfile checks--static-indexโ if someone asks for a directory, it goes searching for the specified file ๐--static-safeโ skips the security checks when the file lives under the specified path--static-cache-pathsโ drops resolved paths into the uWSGI cache for the specified amount of seconds--static-cache-paths-nameโ uses the specified cache for static paths--mimefileโ sets the mime types file path (default/etc/mime.types) ๐ธ--mime-fileโ sets the mime types file path (default/etc/mime.types)--static-expires-typeโ sets theExpiresheader based on content type--static-expires-type-mtimeโ sets theExpiresheader based on content type and file mtime--static-expiresโ sets theExpiresheader based on a filename regexp--static-expires-mtimeโ sets theExpiresheader based on a filename regexp and file mtime--static-expires-uriโ sets theExpiresheader based on aREQUEST_URIregexp--static-expires-uri-mtimeโ sets theExpiresheader based on aREQUEST_URIregexp and file mtime--static-expires-path-infoโ sets theExpiresheader based on aPATH_INFOregexp--static-expires-path-info-mtimeโ sets theExpiresheader based on aPATH_INFOregexp and file mtime--static-gzipโ if the regexp you supplied matches the static file translation, it'll go hunt for a gzip version ๐ฅ--static-gzip-allโ checks for a gzip version of every static file that gets requested--static-gzip-dirโ checks for a gzip version of all requested static files in the specified dir/prefix--static-gzip-prefixโ 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 specified ext/suffix--static-gzip-suffixโ 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 (per-worker, default0)--offload-threadโ sets how many offload threads to spawn (per-worker, default0)--file-serve-modeโ sets the static file serving mode--fileserve-modeโ sets the static file serving mode--disable-sendfileโ disablessendfile()and makes it rely on boring oldread()/write()๐ญ--check-cacheโ checks for response data in the specified cache (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 inside requests)--close-on-exec2โ sets close-on-exec on server sockets (could be required if you're spawning processes inside requests)--modeโ set uWSGI custom mode--envโ set environment variable--envdirโ loads a daemontools compatible envdir--early-envdirโ loads a daemontools compatible envdir ASAP โก--unenvโ unset environment variable--vacuumโ tries to remove all of the generated file/sockets ๐งน--file-writeโ writes the specified content to the specified file (syntax:file=value) before privileges drop--cgroupโ puts the processes in the specified cgroup--cgroup-optโ sets a value in the specified cgroup option--cgroup-dir-modeโ sets the permission for the cgroup directory (default is700)--namespaceโ runs in a new namespace under the specified rootfs--namespace-keep-mountโ keeps the specified mountpoint in your namespace--nsโ run in a new namespace under the specified rootfs--namespace-netโ adds a network namespace--ns-netโ adds a network namespace--enable-proxy-protocolโ enables PROXY1 protocol support (only for http parsers)--reuse-portโ enables theREUSE_PORTflag on the socket (BSD only, bestie, don't come for me)--tcp-fast-openโ enables theTCP_FASTOPENflag on TCP sockets with the specified qlen value--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โ usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if it's supported--zergโ attach to a zerg server ๐พ--zerg-fallbackโ falls back to normal sockets if the zerg server isn't available--zerg-serverโ enables the zerg server on the specified UNIX socket--cronโ add a cron task โฐ--cron2โ add a cron task (key=val syntax)--unique-cronโ add a unique cron task--cron-harakiriโ sets the maximum time (in seconds) we wait for a cron command to complete--legion-cronโ add a cron task that's only runnable when the instance is a lord of the specified legion ๐--cron-legionโ add a cron task that's only runnable when the instance is a lord of the specified legion--unique-legion-cronโ add a unique cron task that's only runnable when the instance is a lord of the specified legion--unique-cron-legionโ add a unique cron task that's only runnable when the instance is a lord of the specified legion--loopโ select the uWSGI loop engine ๐--loop-listโ list enabled loop engines--loops-listโ list enabled loop engines--worker-execโ run the specified command as worker--worker-exec2โ run the specified command as worker (after thepost_forkhook)--attach-daemonโ attaches a command/daemon to the master process (the command has to not go in background) ๐ซก--attach-control-daemonโ attaches a command/daemon to the master process (the command has to not go in background), and when the daemon dies, the master dies too ๐--smart-attach-daemonโ attaches a command/daemon to the master process managed by a pidfile (the command has to daemonize)--smart-attach-daemon2โ attaches 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โ does 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--autoloadโ tries to automatically load plugins when unknown options are found ๐--dlopenโ blindly loads a shared library (no thoughts, head empty)--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 (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โ sets the response header maximum size (default:64k)
๐ the mono era ๐
okay so this whole lil cluster is the Mono plugin's moment to shine, asp.net besties rise up ๐
--mono-appโ load a Mono asp.net app from the specified directory--mono-gc-freqโ run the Mono GC every<n>requests (default: run after every request)--mono-keyโ select theApplicationHostbased on the specified CGI var--mono-versionโ set the Mono jit version--mono-configโ set the Mono config file--mono-assemblyโ load the specified main assembly (default:uwsgi.dll)--mono-execโ exec the specified assembly just before app loading--mono-indexโ add an asp.net index file ๐
and that's a wrap on UWSGI_MONO(1) bestie, we did it, we read the entire thing ๐ซถ this page came from uWSGI version 2.0.24-debian, dated April 2024, and it's filed under UWSGI_MONO(1). go forth and serve those asp.net apps, you absolute icon ๐
โจ
๐ฆ where this page comes from
- ubuntu noble: uwsgi-plugin-mono 2.0.24-2ubuntu10 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms