UWSGI_SQLITE3(1)
โจ NAME โจ
uwsgi_sqlite3 โ fast (pure C), self-healing, developer-friendly WSGI server ๐
bestie, this is the UWSGI_SQLITE3(1) manual page and it's serving main character energy. no cap. ๐ซถ
๐ SYNOPSIS ๐
uwsgi-core [options...]
so you run uwsgi-core with a whole pile of options, and she goes. periodt. ๐
๐ DESCRIPTION ๐
okay so here's the entire menu of options, bestie. each one is a little vibe. read carefully, because every single flag matters, fr fr. ๐
-s,--socketโ bind to the specified UNIX/TCP socket using default protocol. it's giving "just connect me already" โจ-s,--uwsgi-socketโ bind to the specified UNIX/TCP socket usinguwsgiprotocol. lowkey iconic. ๐--suwsgi-socketโ bind to the specified UNIX/TCP socket usinguwsgiprotocol over SSL. secure vibes only. ๐--ssl-socketโ bind to the specified UNIX/TCP socket usinguwsgiprotocol over SSL. slay. ๐--http-socketโ bind to the specified UNIX/TCP socket using HTTP protocol. yesss web requests. ๐--http-socket-modifier1โ force the specifiedmodifier1when using HTTP protocol. boss move. ๐--http-socket-modifier2โ force the specifiedmodifier2when using HTTP protocol. another boss move. ๐--http11-socketโ bind to the specified UNIX/TCP socket using HTTP 1.1 (Keep-Alive) protocol. keep-alive is so fetch. โจ--https-socketโ bind to the specified UNIX/TCP socket using HTTPS protocol. secure and slay. ๐--https-socket-modifier1โ force the specifiedmodifier1when using HTTPS protocol. ๐--https-socket-modifier2โ force the specifiedmodifier2when using HTTPS protocol. ๐--fastcgi-socketโ bind to the specified UNIX/TCP socket using FastCGI protocol. speedy boi. โก--fastcgi-nph-socketโ bind to the specified UNIX/TCP socket using FastCGI protocol (nph mode). nph mode activated. ๐ฆ--fastcgi-modifier1โ force the specifiedmodifier1when using FastCGI protocol. ๐ฅ--fastcgi-modifier2โ force the specifiedmodifier2when 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 specifiedmodifier1when using SCGI protocol. ๐ซ--scgi-modifier2โ force the specifiedmodifier2when using SCGI protocol. ๐ซ--raw-socketโ bind to the specified UNIX/TCP socket using RAW protocol. raw and unfiltered, just like my group chat. ๐ญ--raw-modifier1โ force the specifiedmodifier1when using RAW protocol. ๐--raw-modifier2โ force the specifiedmodifier2when using RAW protocol. ๐--puwsgi-socketโ bind to the specified UNIX/TCP socket using persistent uwsgi protocol (puwsgi). persistent? we love commitment. ๐--protocolโ force the specified protocol for default sockets. choose your fighter. โ๏ธ--socket-protocolโ force the specified protocol for default sockets. same energy. โจ--shared-socketโ create a shared socket for advanced jailing or ipc. sharing is caring. ๐ค--undeferred-shared-socketโ create a shared socket for advanced jailing or ipc (undeferred mode). no waiting around. ๐-p,--processesโ spawn the specified number of workers/processes. get your crew. ๐ฏ-p,--workersโ spawn the specified number of workers/processes. same, but different name. ๐--thunder-lockโ serializeaccept()usage (if possible). thunder lock sounds so dramatic, love that. โก-t,--harakiriโ set harakiri timeout. dramatic exit timing. ๐ก๏ธ--harakiri-verboseโ enable verbose mode for harakiri. tell me everything. ๐ฃ๏ธ--harakiri-graceful-timeoutโ interval between graceful harakiri attempt and asigkill. so you get a warning before the kill. ๐--harakiri-graceful-signalโ use this signal instead ofsigtermfor graceful harakiri attempts. pick your signal. ๐ฆ--harakiri-queue-thresholdโ only trigger harakiri if queue is greater than this threshold. don't be dramatic unless the queue is long. ๐--harakiri-no-arhโ do not enable harakiri during after-request-hook. chill. ๐ง--no-harakiri-arhโ do not enable harakiri during after-request-hook. same vibe. ๐ง--no-harakiri-after-req-hookโ do not enable harakiri during after-request-hook. okay we get it. ๐--backtrace-depthโ set backtrace depth. how deep do you wanna go? ๐--mule-harakiriโ set harakiri timeout for mule tasks. mules get their own drama timer. ๐ด-x,--xmlconfigโ load config from xml file. old school but valid. ๐-x,--xmlโ load config from xml file. same. ๐--configโ load configuration using the pluggable system. plug it in. ๐--fallback-configโ re-exec uwsgi with the specified config when exit code is1. backup plan activated. ๐จ--strictโ enable strict mode (placeholder cannot be used). no placeholders, no exceptions. ๐ค--skip-zeroโ skip check of file descriptor0. zero? don't care. 0๏ธโฃ--skip-atexitโ skip atexit hooks (ignored by the master). bye bye cleanup. ๐--skip-atexit-teardownโ skip atexit teardown (ignored by the master). double bye. ๐๐-S,--setโ set a placeholder or an option. set it and forget it. โจ--set-placeholderโ set a placeholder. just a placeholder. ๐--set-phโ set a placeholder. short and sweet. ๐--getโ print the specified option value and exit. get in, get out. ๐--declare-optionโ declare a new uWSGI custom option. make it yours. ๐--declare-option2โ declare a new uWSGI custom option (non-immediate). non-immediate, so it waits. โณ--resolveโ place the result of a dns query in the specified placeholder,sytax: placeholder=name(immediate option). dns but make it placeholder. ๐--forโ (opt logic) for cycle. loop de loop. ๐--for-globโ (opt logic) for cycle (expand glob). glob expansion, fancy. ๐ฆ--for-timesโ (opt logic) for cycle (expand the specified num to a list starting from1). count from 1. 1๏ธโฃ--for-readlineโ (opt logic) for cycle (expand the specified file to a list of lines). read those lines. ๐--endforโ (opt logic) end for cycle. close the loop. ๐--end-forโ (opt logic) end for cycle. same. ๐--if-optโ (opt logic) check for option. if option, then. ๐ค--if-not-optโ (opt logic) check for option. if not, then. ๐--if-envโ (opt logic) check for environment variable. env check. ๐ฑ--if-not-envโ (opt logic) check for environment variable. not env check. ๐ซ--ifenvโ (opt logic) check for environment variable. short form. โจ--if-reloadโ (opt logic) check for reload. reload check. ๐--if-not-reloadโ (opt logic) check for reload. not reload check. โ--if-hostnameโ (opt logic) check for hostname. hostname? ๐--if-not-hostnameโ (opt logic) check for hostname. no hostname? ๐--if-hostname-matchโ (opt logic) try to match hostname against a regular expression. regex realness. ๐--if-not-hostname-matchโ (opt logic) try to match hostname against a regular expression. not match. ๐คท--if-existsโ (opt logic) check for file/directory existence. does it exist? ๐ค--if-not-existsโ (opt logic) check for file/directory existence. doesn't exist. ๐--ifexistsโ (opt logic) check for file/directory existence. short. โจ--if-pluginโ (opt logic) check for plugin. plugin check. ๐--if-not-pluginโ (opt logic) check for plugin. no plugin. ๐ซ--ifpluginโ (opt logic) check for plugin. short. ๐--if-fileโ (opt logic) check for file existence. file? ๐--if-not-fileโ (opt logic) check for file existence. no file? โ--if-dirโ (opt logic) check for directory existence. directory? ๐--if-not-dirโ (opt logic) check for directory existence. no directory? ๐ซ--ifdirโ (opt logic) check for directory existence. short. โจ--if-directoryโ (opt logic) check for directory existence. long. ๐--endifโ (opt logic) end if. end it. ๐--end-ifโ (opt logic) end if. same. ๐--blacklistโ set options blacklist context. blacklist mode. ๐ค--end-blacklistโ clear options blacklist context. clear it. ๐งผ--whitelistโ set options whitelist context. whitelist mode. ๐ค--end-whitelistโ clear options whitelist context. clear it. ๐งผ--ignore-sigpipeโ do not report (annoying)SIGPIPE. ignore the noise. ๐--ignore-write-errorsโ do not report (annoying)write()/writev()errors. ignore the mess. ๐--write-errors-toleranceโ set the maximum number of allowed write errors (default: no tolerance). zero tolerance? yes. ๐ซ--write-errors-exception-onlyโ only raise an exception on write errors giving control to the app itself. let the app handle it. ๐ฎ--disable-write-exceptionโ disable exception generation onwrite()/writev(). no exceptions. ๐ซ--inheritโ use the specified file as config template. inherit the vibe. ๐งฌ--includeโ include the specified file as immediate configuration. include it now. โก--inject-beforeโ inject a text file before the config file (advanced templating). inject before. ๐--inject-afterโ inject a text file after the config file (advanced templating). inject after. ๐-d,--daemonizeโ daemonize uWSGI. go live in the background. ๐--daemonize2โ daemonize uWSGI after app loading. wait for the app, then background. โณ--stopโ stop an instance. stop right there. โ--reloadโ reload an instance. refresh. ๐--pauseโ pause an instance. pause. โธ๏ธ--suspendโ suspend an instance. suspend. โธ๏ธ--resumeโ resume an instance. play. โถ๏ธ--connect-and-readโ connect to a socket and wait for data from it. connect and chill. ๐--extractโ fetch/dump any supported address to stdout. dump it. ๐ค-l,--listenโ set the socket listen queue size. how many can wait in line. ๐ถ-v,--max-varsโ set the amount of internaliovec/varsstructures. structure budget. ๐๏ธ--max-appsโ set the maximum number of per-worker applications. app limit. ๐ฑ-b,--buffer-sizeโ set internal buffer size. buffer baby. ๐ฆ-m,--memory-reportโ enable memory report. report that memory. ๐ง--profilerโ enable the specified profiler. profile it. ๐-c,--cgi-modeโ force CGI-mode for plugins supporting it. cgi mode. ๐ฐ๏ธ-a,--abstract-socketโ force UNIX socket in abstract mode (Linux only). abstract, but only on Linux. ๐ง-C,--chmod-socketโ chmod-socket. permission slip. ๐-C,--chmodโ chmod-socket. same. ๐--chown-socketโ chown unix sockets. change owner. ๐--umaskโ set umask. mask it. ๐ญ--freebindโ put socket in freebind mode. freebind, free your mind. ๐๏ธ--map-socketโ map sockets to specific workers. assign them. ๐บ๏ธ-T,--enable-threadsโ enable threads (stub option this is true by default). threads are on by default, but here's the flag. ๐งต--no-threads-waitโ do not wait for threads cancellation on quit/reload. don't wait up. ๐--auto-procnameโ automatically set processes name to something meaningful. name drop automatically. ๐ท๏ธ--procname-prefixโ add a prefix to the process names. prefix it. ๐ค--procname-prefix-spacedโ add a spaced prefix to the process names. space it out. โฃ--procname-appendโ append a string to process names. append it. โ--procnameโ set process names. name it. ๐--procname-masterโ set master process name. name the master. ๐-i,--single-interpreterโ do not use multiple interpreters (where available). one interpreter only. 1๏ธโฃ--need-appโ exit if no app can be loaded. no app? bye. ๐ช-M,--masterโ enable master process. master mode. ๐--honour-stdinโ do not remap stdin to/dev/null. keep stdin real. โจ๏ธ--emperorโ run the Emperor. bow down. ๐--emperor-proxy-socketโ force the vassal to became an Emperor proxy. vassal becomes proxy. ๐--emperor-wrapperโ set a binary wrapper for vassals. wrap it up. ๐--emperor-wrapper-overrideโ set a binary wrapper for vassals to try before the default one. try this first. ๐ฅ--emperor-wrapper-fallbackโ set a binary wrapper for vassals to try as a last resort. last resort. ๐--emperor-nofollowโ do not follow symlinks when checking for mtime. no follow. ๐ซ--emperor-procnameโ set the Emperor process name. name the Emperor. ๐--emperor-freqโ set the Emperor scan frequency (default3seconds). every 3 seconds by default. โฐ--emperor-required-heartbeatโ set the Emperor tolerance about heartbeats. heartbeat tolerance. ๐--emperor-curse-toleranceโ set the Emperor tolerance about cursed vassals. cursed vassals? tolerance. ๐
to be continued, bestie... โญ๏ธ๐
Ok so like โ the emperor section continues, and bestie, it is long. Buckle up ๐
--emperor-pidfileโ drops the Emperor's pid into the file you name. That's it, that's the whole job โจ--emperor-tyrantโ flips the Emperor into Tyrant mode. Yes it's called that. No we don't make the rules ๐--emperor-tyrant-nofollowโ in Tyrant mode, when it's checking uid/gid, it will not follow symlinks. Fr fr, no shortcuts through links ๐ โโ๏ธ--emperor-statsโ runs the Emperor stats server ๐--emperor-stats-serverโ also runs the Emperor stats server. Yeah, twin flags, iconic behavior ๐--early-emperorโ spawns the emperor as soon as possible, like it's got somewhere to be ๐โโ๏ธ--emperor-broodlordโ runs the emperor in BroodLord mode. Very scary name, very real flag ๐ฆ--emperor-throttleโ sets the throttling level, in milliseconds, for vassals that are acting up (default1000)--emperor-max-throttleโ sets the max throttling level, in milliseconds, for your bad-behaving vassals (default3 minutes). They get grounded, basically ๐ค--emperor-magic-execโ prefixes vassals' config files withexec://if those files have the executable bit set. magic fr โจ--emperor-on-demand-extensionโ searches for a text file (vassal name + extension) that contains the on demand socket name--emperor-on-demand-extโ same exact energy as above: searches 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 directory you give, named like the vassal +.socket--emperor-on-demand-dirโ ok the short twin again: enables on demand mode, binding to the unix socket in your specified directory, named like the vassal +.socket--emperor-on-demand-execโ uses the output of the command you specify as the on demand socket name (the vassal name gets passed as the only argument)--emperor-extra-extensionโ lets the Emperor allow the extension you name (the vassal will get called with--config)--emperor-extra-extโ same thing, short name: allows that specified extension in the Emperor (vassal gets called with--config)--emperor-no-blacklistโ kills the Emperor blacklisting subsystem entirely ๐--emperor-use-cloneโ usesclone()instead offork(), passing along whateverunshare()flags you specify ๐งฌ--emperor-graceful-shutdownโ makes vassals do a graceful shutdown during ragnarok. Yes, ragnarok. Periodt โ๏ธ--emperor-capโ sets vassals capability--vassals-capโ sets vassals capability (yep, same thing, different name ๐ซถ)--vassal-capโ sets vassals capability (third one. obsessed with redundancy tbh)--imperial-monitor-listโ lists the enabled imperial monitors ๐--imperial-monitors-listโ lists the enabled imperial monitors (the plural version, for the plural girlies)--vassals-inheritโ adds config templates to your vassals' config (it uses--inherit)--vassals-includeโ includes config templates into your vassals' config (uses--includeinstead of--inherit)--vassals-inherit-beforeโ adds config templates to vassals' config (uses--inherit, and it parses before the vassal file)--vassals-include-beforeโ includes config templates into vassals' config (uses--includeinstead of--inherit, and parses before the vassal file)--vassals-start-hookโ runs the command you give before every single vassal starts ๐ฌ--vassals-stop-hookโ runs that command after a vassal's death ๐--vassal-sosโ asks the emperor for reinforcement when it's overloaded. literally a distress signal ๐--vassal-sos-backlogโ asks the emperor for sos if the backlog queue has more items than the value you set--vassals-setโ automatically sets the option you specify (via--set) for every vassal--vassal-setโ same, singular flavor: automatically sets the specified option (via--set) for every vassal--heartbeatโ announces healthiness to the emperor ๐--reload-mercyโ sets the maximum time, in seconds, that we wait for workers and other processes to die during reload/shutdown--worker-reload-mercyโ sets the maximum time, in seconds, a worker can take to reload/shutdown (default is60)--mule-reload-mercyโ sets the maximum time, in seconds, a mule can take to reload/shutdown (default is60)--exit-on-reloadโ forces exit even if a reload was requested. it's leaving and it doesn't care ๐ช--die-on-termโ exits instead of doing a brutal reload onSIGTERM--force-gatewayโ forces the spawn of the first registered gateway without a master-h,--helpโ shows this help ๐ซถ-h,--usageโ shows this help (same flag, second name, we love a double)--print-symโ prints the content of the binary symbol you specify--print-symbolโ prints the content of that specified binary symbol (the long-name twin)-r,--reaperโ callswaitpid(-1,...)after each request to get rid of zombies ๐งโโ๏ธ-R,--max-requestsโ reloads workers after the specified amount of managed requests--max-requests-deltaโ adds(worker_id * delta)to themax_requestsvalue of each worker--min-worker-lifetimeโ number of seconds a worker must run before it can be reloaded (default is10)--max-worker-lifetimeโ reloads workers after the specified amount of seconds (default isdisabled)--max-worker-lifetime-deltaโ adds(worker_id * delta)seconds to themax_worker_lifetimevalue of each worker-z,--socket-timeoutโ sets the internal sockets timeout--no-fd-passingโ disables file descriptor passing--locksโ creates the specified number of shared locks ๐--lock-engineโ sets the lock engine--ftokโ sets the ipcsem key viaftok()for avoiding duplicates--persistent-ipcsemโ does not remove ipcsem's on shutdown. they stay. forever. ๐-A,--sharedareaโ creates a raw shared memory area of the specified pages (note: it supports keyval too)--safe-fdโ does not close the file descriptor you specify--fd-safeโ does not close the specified file descriptor (the reversed-name twin)--cacheโ creates a shared cache containing the given elements--cache-blocksizeโ sets cache blocksize--cache-storeโ enables persistent cache to disk ๐พ--cache-store-syncโ sets the frequency of sync for the persistent cache--cache-no-expireโ disables the auto sweep of expired items--cache-expire-freqโ sets the frequency of cache sweeper scans (default3 seconds)--cache-report-freed-itemsโ constantly reports the cache items freed by the sweeper--cache-udp-serverโ binds the cache udp server (used only for set/update/delete) to the socket you specify--cache-udp-nodeโ sends cache update/deletion to the cache udp server you specify--cache-syncโ copies the entire content of another uWSGI cache server on server startup--cache-use-last-modifiedโ updates thelast_modified_attimestamp on every cache item modification (default isdisabled)--add-cache-itemโ adds an item in the cache--load-file-in-cacheโ loads a static file into the cache--load-file-in-cache-gzipโ loads a static file into the cache with gzip compression ๐๏ธ--cache2โ creates a new generation shared cache (keyval syntax)--queueโ enables the shared queue--queue-blocksizeโ sets the queue blocksize--queue-storeโ enables persistent queue to disk--queue-store-syncโ sets the frequency of sync for the persistent queue-Q,--spoolerโ runs a spooler on the directory you specify ๐งต--spooler-externalโ maps spooler requests to a spooler directory managed by an external instance--spooler-orderedโ tries to order the execution of spooler tasks--spooler-chdirโchdir()s to the specified directory before each spooler task--spooler-processesโ sets the number of processes for spoolers--spooler-quietโ does not be verbose with spooler tasks ๐คซ--spooler-max-tasksโ sets the maximum number of tasks to run before recycling a spooler--spooler-harakiriโ sets the harakiri timeout for spooler tasks--spooler-frequencyโ sets spooler frequency--spooler-freqโ sets spooler frequency (yes, the short one, we stan a nickname)--muleโ adds a mule ๐ด--mulesโ adds the specified number of mules--farmโ adds a mule farm ๐พ--mule-msg-sizeโ sets the mule message buffer size--signalโ sends a uwsgi signal to a server ๐ก--signal-bufsizeโ sets the buffer size for the signal queue--signals-bufsizeโ sets the buffer size for the signal queue (plural vibe)--signal-timerโ adds a timer (syntax:<signal> <seconds>)--timerโ adds a timer (syntax:<signal> <seconds>)--signal-rbtimerโ adds a redblack timer (syntax:<signal> <seconds>)--rbtimerโ adds a redblack timer (syntax:<signal> <seconds>)--rpc-maxโ maximum number of rpc slots (default:64)-L,--disable-loggingโ disables request logging--flockโ locks the specified file before starting, and exits if it's locked--flock-waitโ locks the specified file before starting, and waits if it's locked--flock2โ locks the specified file after logging/daemon setup, and exits if locked--flock-wait2โ locks the specified file after logging/daemon setup, and waits if locked--pidfileโ creates a pidfile (before privileges drop)--pidfile2โ creates a pidfile (after privileges drop)--safe-pidfileโ creates a safe pidfile (before privileges drop)--safe-pidfile2โ creates a safe pidfile (after privileges drop)--chrootโchroot()s to the specified directory--pivot-rootโpivot_root()s to the specified directories--pivot_rootโpivot_root()s to the specified directories (same flag, underscore edition)
ok bestie, heads up on the pivot ones:new_rootandput_oldmust be separated with a space. no space, no joy ๐
--uidโsetuidto the specified user/uid--gidโsetgidto the specified group/gid--add-gidโ adds the given group id to the process credentials--immediate-uidโsetuidto the specified user/uid IMMEDIATELY โ capital letters are doing the emotional labor here--immediate-gidโsetgidto the specified group/gid IMMEDIATELY--no-initgroupsโ disables the additional groups that get set viainitgroups()๐--capโ sets the process capability--unshareโunshare()s part of the processes and throws them into a new namespace ๐--unshare2โunshare()s part of the processes and puts them in a new namespace after rootfs change--setns-socketโ exposes a unix socket that returns namespace fds from/proc/self/ns--setns-socket-skipโ skips the specified entry when sending setns file descriptors--setns-skipโ skips the specified entry when sending setns file descriptors (same rule, shorter name)--setnsโ joins a namespace created by an external uWSGI instance--setns-preopenโ opens/proc/self/nsas soon as possible and caches the fds โญ
ok and there's still more coming, don't go anywhere ๐
okay bestie we're deep in the flag forest now ๐ฒ these are the ones that tell uWSGI when to do the cute little things โ hooks, execs, mounts, waits, calls โ plus a pile of socket tuning and reload triggers. Buckle up. ๐
--jailedโ marks the instance as jailed (which forces thepost_jailhooks to actually run).--reforkโ does afork()again after privileges drop. Slays for jailing systems. ๐ฆ--re-forkโ literally the same thing as--refork:fork()again after privileges drop. Jailing systems love this one.--refork-as-rootโfork()again, but before privileges drop. Still the jailing-systems vibe.--re-fork-as-rootโ yes bestie, same as--refork-as-root.fork()again before privileges drop.--refork-post-jailโfork()again after jailing. Jailing systems, u guessed it.--re-fork-post-jailโ identical twin of--refork-post-jail.fork()again after jailing.
๐ the hook squad ๐
--hook-asapโ run the specified hook as soon as possible.--hook-pre-jailโ run the specified hook before jailing.--hook-post-jailโ run the specified hook after jailing.--hook-in-jailโ run the specified hook in jail, after initialization.--hook-as-rootโ run the specified hook before privileges drop.--hook-as-userโ run the specified hook after privileges drop.--hook-as-user-atexitโ run the specified hook before app exit and reload.--hook-pre-appโ run the specified hook before app loading.--hook-post-appโ run the specified hook after app loading.--hook-post-forkโ run the specified hook after each fork.--hook-acceptingโ run the specified hook after each worker enters the accepting phase.--hook-accepting1โ run the specified hook after the first worker enters the accepting phase.--hook-accepting-onceโ run the specified hook after each worker enters the accepting phase, but only 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 goes like:<file> <action>.--hook-emperor-startโ run the specified hook when the Emperor starts.--hook-emperor-stopโ run the specified hook when the Emperor sends a stop message.--hook-emperor-reloadโ run the specified hook when the Emperor sends a reload message.--hook-emperor-lostโ run the specified hook when the Emperor connection is lost. ๐ญ--hook-as-vassalโ run the specified hook beforeexec()ing the vassal.--hook-as-emperorโ run the specified hook in the emperor, after the vassal has been started.--hook-as-muleโ run the specified hook in each mule.--hook-as-gatewayโ run the specified hook in each gateway.--after-request-hookโ run the specified function/symbol after each request.--after-request-callโ run the specified function/symbol after each request (yep, same energy as the one above).
โจ exec o'clock โจ
--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.
๐ง mounts & unmounts ๐ง
--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 โณ
--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.
๐ the call squad ๐
note the exact signatures bestie, they are NOT interchangeable ๐
--call-asapโ call the specified function as soon as possible.--call-pre-jailโ call the specified function before jailing.--call-post-jailโ call the specified function after jailing.--call-in-jailโ call the specified function in jail, after initialization.--call-as-rootโ call the specified function before privileges drop.--call-as-userโ call the specified function after privileges drop.--call-as-user-atexitโ call the specified function before app exit and reload.--call-pre-appโ call the specified function before app loading.--call-post-appโ call the specified function after app loading.--call-as-vassalโ call the specifiedfunction()beforeexec()ing the vassal.--call-as-vassal1โ call the specifiedfunction(char *)beforeexec()ing the vassal.--call-as-vassal3โ call the specifiedfunction(char *, uid_t, gid_t)beforeexec()ing the vassal.--call-as-emperorโ call the specifiedfunction()in the emperor, after the vassal has been started.--call-as-emperor1โ call the specifiedfunction(char *)in the emperor, after the vassal has been started.--call-as-emperor2โ call the specifiedfunction(char *, pid_t)in the emperor, after the vassal has been started.--call-as-emperor4โ call the specifiedfunction(char *, pid_t, uid_t, gid_t)in the emperor, after the vassal has been started.
๐ config files, but make it a buffet ๐
--iniโ load config from an ini file.-y,--yamlโ load config from a yaml file.-y,--ymlโ load config from a yaml file.-j,--jsonโ load config from a json file.-j,--jsโ load config from a json file.
๐ instance vibes & server mode ๐
--weightโ weight of the instance (used by clustering/lb/subscriptions).--auto-weightโ set the weight of the instance automatically (used by clustering/lb/subscriptions).--no-serverโ force no-server mode.--command-modeโ force command mode.
๐ฅ socket glow-up ๐ฅ
--no-defer-acceptโ disable deferred-accept on sockets.--tcp-nodelayโ enable TCP NODELAY on each request.--so-keepaliveโ enable TCP KEEPALIVEs.--so-send-timeoutโ setSO_SNDTIMEO.--socket-send-timeoutโ setSO_SNDTIMEO.--so-write-timeoutโ setSO_SNDTIMEO.--socket-write-timeoutโ setSO_SNDTIMEO.--socket-sndbufโ setSO_SNDBUF.--socket-rcvbufโ setSO_RCVBUF.--shutdown-socketsโ force callingshutdown()in addition toclose()when sockets are destroyed.
๐ limits & reloads (the spicy 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 the specified megabytes.--reload-on-rssโ reload if rss memory is higher than the specified megabytes.--evil-reload-on-asโ force the master to reload a worker if its address space is higher than the specified megabytes.--evil-reload-on-rssโ force the master to reload a worker if its rss memory is higher than the 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 it and it reacts ๐ธ
--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 a command when the specified file is modified/touched. Syntax:file command.--touch-signalโ bestie, this one keeps an eye on a file, and the second it gets modified/touched you get a signal. Syntax isfile signal, okay? Two things, in that order. ๐--fs-reloadโ watches a filesystem object and does a graceful reload when it changes. chill queen behaviour, no dropped requests โจ--fs-brutal-reloadโ same energy but make it feral: brutal reload the moment that filesystem object changes. no grace, all drama ๐--fs-signalโ raise a uwsgi signal when the specified filesystem object is modified. syntax:file signal. ๐ฆ--check-mountpointโ if a filesystem stops being reachable, this destroys the instance. sounds harsh but it's literally useful for reliable Fuse management ๐ซถ--mountpoint-checkโ obvs the same thing: destroy the instance if a filesystem is no more reachable (again: useful for reliable Fuse management). twin sister of--check-mountpoint๐--check-mountโ yep, you guessed it โ destroy the instance if a filesystem is no more reachable. useful for reliable Fuse management. third sibling ๐--mount-checkโ and the fourth: destroy the instance if a filesystem is no more reachable. useful for reliable Fuse management. the whole squad is here ๐ธ--propagate-touchโ ngl this is described as an over-engineering option for systems with flaky signal management. it's giving bandaid energy but ok ๐ฉน--limit-postโ put a cap on the request body. no giant posts allowed, we're gatekeeping ๐ง--no-orphansโ if master dies, the workers get automatically killed. queen. but heads up: this can be dangerous for availability ๐ญ--prioโ set the priority of processes/threads.--cpu-affinityโ pin down that cpu affinity. main character cores only ๐--post-bufferingโ set the size in bytes after which the body gets buffered to disk instead of memory. spill the tea (to disk) ๐พ--post-buffering-bufsizeโ sets the buffer size used forread()while you're in post buffering mode.--body-read-warningโ sets how much memory allocation (in megabytes) for the request body is allowed before it starts printing a warning at you. it's the "bestie are you okay" threshold ๐--upload-progressโ turns on creation of.jsonfiles inside the directory you specify, while a file upload is happening. watch the progress live, iconic ๐--no-default-appโ don't fall back to the default app. we're not doing backups today โ--manage-script-nameโ automatically rewritesSCRIPT_NAMEandPATH_INFOfor you. it handles the admin so you don't have to ๐--ignore-script-nameโ just straight up ignoresSCRIPT_NAME. not your business, moving on ๐--catch-exceptionsโ reports the exception as http output. and listen: the manpage says this is discouraged, use only for testing. so like, testing only fr fr ๐งช--reload-on-exceptionโ an exception gets raised โ the worker reloads. clean slate energy โจ--reload-on-exception-typeโ reloads a worker when a specific exception type is raised. โจ--reload-on-exception-valueโ reloads a worker when a specific exception value is raised. โจ--reload-on-exception-reprโ reloads a worker when a specific exception type+value (language-specific) is raised. the combo meal ๐ฅ--exception-handlerโ add an exception handler. you're the handler now ๐ซถ--enable-metricsโ turns on the metrics subsystem. numbers, we love numbers ๐--metricโ add a custom metric. make it personal ๐--metric-thresholdโ add a metric threshold/alarm.--metric-alarmโ add a metric threshold/alarm. same vibe, different spelling ๐--alarm-metricโ add a metric threshold/alarm. the third twin ๐--metrics-dirโ export metrics as text files into the directory you give it. ๐๏ธ--metrics-dir-restoreโ restore the last value taken from the metrics dir. memory queen ๐ง--metric-dirโ export metrics as text files to the specified directory. (singular spelling, same job) ๐๏ธ--metric-dir-restoreโ restore the last value taken from the metrics dir. ๐ง--metrics-no-coresโ disables generation of the cores-related metrics. no core metrics for you ๐ซ--udpโ run the udp server on the specified address.--statsโ enables the stats server on the address you give it. ๐--stats-serverโ enables the stats server on the specified address. same girl, longer name ๐--stats-httpโ prefixes the stats server json output with http headers. fancy it up โจ--stats-minifiedโ minifies the statistics json output. small and cute ๐--stats-minโ minifies statistics json output. short name, same tiny energy ๐--stats-pushโ push the stats json straight to the destination you specify. yeet ๐ค--stats-pusher-default-freqโ set the default frequency of stats pushers. โฐ--stats-pushers-default-freqโ set the default frequency of stats pushers. plural version, same deal โฐ--stats-no-coresโ disable generation of cores-related stats. ๐ซ--stats-no-metricsโ don't include metrics in the stats output. keep it lean ๐--multicastโ subscribe to the multicast group you specify. ๐ก--multicast-ttlโ set the multicast ttl.--multicast-loopโ set the multicast loop (default 1).--master-fifoโ enables the master fifo. ๐๏ธ--notify-socketโ enables the notification socket. ๐--subscription-notify-socketโ sets the notification socket used for subscriptions. ๐--legionโ become a member of a legion. yes like a whole squad ๐ค--legion-mcastโ become a member of a legion (it's a 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 the legion subsystem. be patient bestie ๐ซถ--legion-death-on-lord-errorโ if one of the lord hooks fails, it declares itself a dead node for the number of seconds you specify. dramatic but valid ๐--legion-skew-toleranceโ set the clock skew tolerance of the legion subsystem (default 60 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 (that's the shutdown of the instance). ๐--legion-joinโ action to call on legion join (the first time quorum is reached). ๐--legion-node-joinedโ action to call when a new node joins the legion. ๐ซ--legion-node-leftโ action to call when a node leaves the legion. ๐--legion-quorumโ set the quorum of a legion.--legion-scrollโ set the scroll of a legion. ๐--legion-scroll-max-sizeโ set the max size of the legion scroll buffer. ๐--legion-scroll-list-max-sizeโ set the max size of the legion scroll list buffer. ๐--subscriptions-sign-checkโ set the digest algorithm and the certificate directory for the secured subscription system. ๐--subscriptions-sign-check-toleranceโ set the maximum tolerance (in seconds) of clock skew for the secured subscription system. โฐ--subscriptions-sign-skip-uidโ when using unix sockets credentials, skip the signature check for the uid you specify. ๐ช--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 the load balancing algorithm for the subscription system. โ๏ธ--subscription-dotsplitโ tries to fall back to the next part (dot based) in the subscription key. ๐ฏ--subscribe-toโ subscribe to the subscription server you specify. ๐ฌ--stโ subscribe to the specified subscription server. tiny name, big job ๐ฌ--subscribeโ subscribe to the specified subscription server. ๐ฌ--subscribe2โ subscribe to the specified subscription server using the advanced keyval syntax. the glow-up version โจ--subscribe-freqโ send the subscription announce at the interval you specify. ๐ฃ--subscription-toleranceโ set the tolerance for subscription servers. ๐ซถ--unsubscribe-on-graceful-reloadโ forces the unsubscribe request even during a graceful reload. no lurking subs ๐--start-unsubscribedโ configure your subscriptions but don't actually send them (super useful with master fifo). ๐--subscribe-with-modifier1โ forces the specifiedmodifier1when subscribing.--snmpโ enable the embedded snmp server. ๐--snmp-communityโ set the snmp community string. ๐--ssl-verboseโ be verbose about SSL errors. spill it all ๐--ssl-verify-depthโ set the maximum certificate verification depth. ๐ช--sniโ add an SNI-governed SSL context. ๐ง--sni-dirโ checks for acert/key/client_cafile in the directory you specify, and creates a sni/ssl context on demand. iconic on-demand behaviour ๐--sni-dir-ciphersโ set the ssl ciphers for thesni-diroption. ๐--ssl-enable3โ enable SSLv3, which is insecure. girlypop, be careful ๐--ssl-enable-sslv3โ enable SSLv3 (insecure). same warning, different flag name โ ๏ธ--ssl-enable-tlsv1โ enable TLSv1 (insecure). yeah. also insecure. we said what we said โ ๏ธ--ssl-optionโ set a raw ssl option (numeric value). ๐ข--sni-regexpโ add an SNI-governed SSL context, except the key is a regexp. regex girlies rise ๐ธ--ssl-tmp-dirโ store the ssl-related temp files in the directory you specify. ๐๏ธ--check-intervalโ set the interval (in seconds) of master checks. โฐ--forkbomb-delayโ when a forkbomb is detected, sleep for the number of seconds you specify. nap time ๐ด--binary-pathโ force the binary path. ๐--privileged-binary-patchโ patch the uwsgi binary with a new command (before the privileges drop). ๐ง--unprivileged-binary-patchโ patch the uwsgi binary with a new command (after the 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 the number of cores you specify. โก--max-fdโ set the maximum number of file descriptors. heads up: requires root privileges ๐--logtoโ set the logfile/udp address. ๐--logto2โ log to the file or udp address you specify, but after the privileges drop. ๐--log-formatโ set an advanced format for request logging. ๐จ--logformatโ set advanced format for request logging. same thing, one less dash ๐จ--logformat-strftimeโ applystrftimeto the logformat output. time stuff, cute ๐ฐ๏ธ--log-format-strftimeโ applystrftimeto logformat output. ๐ฐ๏ธ--logfile-chownโ chown the logfiles. ๐--logfile-chmodโ chmod the logfiles. ๐--log-syslogโ log to syslog. ๐ฎ--log-socketโ send logs to the socket you specify. ๐งฆ--req-loggerโ set/append a request logger. ๐๏ธ--logger-reqโ set/append a request logger. ๐๏ธ--loggerโ set/append a logger. ๐๏ธ--logger-listโ list the enabled loggers. ๐--loggers-listโ list enabled loggers. ๐--threaded-loggerโ offloads the log writing to a thread. multitasking queen ๐--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 (aka do not show) log lines that match the regexp you specify. bye ๐--log-filterโ show only the log lines matching the regexp you specify. picky and valid ๐--log-routeโ log to the named logger you specify if the regexp applied to the logline matches. ๐--log-req-routeโ log requests to the named logger you specify if the regexp applied to the logline matches. ๐--use-abortโ callsabort()on segfault/fpe, which could be useful for generating a core dump. โ ๏ธ--alarmโ create a new alarm. syntax:<alarm> <plugin:args>. โฐ
okay bestie, still in OPTIONS, still slaying ๐ this next batch is the alarm-core / logging / routing-industrial-complex era of the config file. hydrate. ๐
๐ alarm core ๐
--alarm-cheapโ use the main alarm thread instead of creating dedicated threads for the curl-based alarms. yes queen, reuse the thread, be economical โจ--alarm-freqโ tune the anti-loop alarm system. the default is 3 seconds.--alarm-fdโ raise the specified alarm when an fd is read for read. by default it reads1byte, set8for eventfd.--alarm-segfaultโ raise the specified alarm when the segmentation fault handler is executed ๐--segfault-alarmโ raise the specified alarm when the segmentation fault handler is executed. (same energy, different spelling, we don't judge ๐ซถ)--alarm-backlogโ raise the specified alarm when the socket backlog queue is full.--backlog-alarmโ raise the specified alarm when the socket backlog queue is full.--lq-alarmโ raise the specified alarm when the socket backlog queue is full.--alarm-lqโ raise the specified alarm when the socket backlog queue is full.--alarm-listen-queueโ raise the specified alarm when the socket backlog queue is full.--listen-queue-alarmโ raise the specified alarm when the socket backlog queue is full. (six names, one behaviour, that's just how the backlog queue do ๐ญ)--log-alarmโ raise the specified alarm when a log line matches the specified regexp. syntax:<alarm>[,alarm...] <regexp>--alarm-logโ raise the specified alarm when a log line matches the specified regexp. syntax:<alarm>[,alarm...] <regexp>--not-log-alarmโ skip the specified alarm when a log line matches the specified regexp. syntax:<alarm>[,alarm...] <regexp>--not-alarm-logโ skip the specified alarm when a log line matches the specified regexp. syntax:<alarm>[,alarm...] <regexp>--alarm-listโ list enabled alarms ๐--alarms-listโ list enabled alarms--alarm-msg-sizeโ set the max size of an alarm message. default is8192.
๐ logging era ๐ธ
--log-masterโ delegate logging to the master process.--log-master-bufsizeโ set the buffer size for the master logger. bigger log messages will be truncated, so watch that.--log-master-streamโ create the master logpipe asSOCK_STREAM.--log-master-req-streamโ create the master requests logpipe asSOCK_STREAM.--log-reopenโ reopen log after reload ๐--log-truncateโ truncate log on startup.--log-maxsizeโ set maximum logfile size.--log-backupnameโ set logfile name after rotation. the glow-up after the chop โจ--logdateโ prefix logs with date or a strftime string.--log-dateโ prefix logs with date or a strftime string.--log-prefixโ prefix logs with a string.--log-zeroโ log responses without body.--log-slowโ log requests slower than the specified number of milliseconds ๐ข--log-4xxโ log requests with a 4xx response.--log-5xxโ log requests with a 5xx response.--log-bigโ log requests bigger than the specified size.--log-sendfileโ log sendfile requests.--log-ioerrorโ log requests with io errors.--log-microsโ report response time in microseconds instead of milliseconds. precision girlie ๐--log-x-forwarded-forโ use the ip fromX-Forwarded-Forheader instead ofREMOTE_ADDR.
๐ง master, privileges, working dir ๐
--master-as-rootโ leave master process running as root. (yes it says what you think it says ๐ซฃ)--drop-after-initโ run privileges drop after plugin initialization, superseded bydrop-after-apps.--drop-after-appsโ run privileges drop after apps loading, superseded bymaster-as-root.--force-cwdโ force the initial working directory to the specified value.--binshโ override/bin/sh(used by exec hooks, it always fallback to/bin/sh).--chdirโchdirto specified directory before apps loading.--chdir2โchdirto specified directory after apps loading.
๐ด lazy / cheap / cheaper girlies ๐ค
--lazyโ set lazy mode (load apps in workers instead of master).--lazy-appsโ load apps in each worker instead of the master.--cheapโ set cheap mode (spawn workers only after the first request).--cheaperโ set cheaper mode (adaptive process spawning).--cheaper-initialโ set the initial number of processes to spawn in cheaper mode.--cheaper-algoโ choose to algorithm used for adaptive process spawning.--cheaper-stepโ number of additional processes to spawn at each overload.--cheaper-overloadโ increase workers after specified overload.--cheaper-algo-listโ list enabled cheapers algorithms.--cheaper-algos-listโ list enabled cheapers algorithms.--cheaper-listโ list enabled cheapers algorithms.--cheaper-rss-limit-softโ don't spawn new workers if total resident memory usage of all workers is higher than this limit.--cheaper-rss-limit-hardโ if total workers resident memory usage is higher try to stop workers.--idleโ set idle mode (put uWSGI in cheap mode after inactivity).--die-on-idleโ shutdown uWSGI when idle ๐
๐งต mount + threads โญ
--mountโ load application under mountpoint.--worker-mountโ load application under mountpoint in the specified worker or after workers spawn.--threadsโ run each worker in prethreaded mode with the specified number of threads.--thread-stacksizeโ set threads stacksize.--threads-stacksizeโ set threads stacksize.--thread-stack-sizeโ set threads stacksize.--threads-stack-sizeโ set threads stacksize. (four spellings, one stack, iconic ๐)
๐ vhost ๐
--vhostโ enable virtualhosting mode (based onSERVER_NAMEvariable).--vhost-hostโ enable virtualhosting mode (based onHTTP_HOSTvariable).
๐ฆ ROUTING โ main character section, pay attention ๐ซถ
this is where uWSGI stops being a server and starts being a matchmaker. every --route* needs a route ๐
--routeโ add a route.--route-hostโ add a route based onHostheader.--route-uriโ add a route based onREQUEST_URI.--route-qsโ add a route based onQUERY_STRING.--route-remote-addrโ add a route based onREMOTE_ADDR.--route-user-agentโ add a route based onHTTP_USER_AGENT.--route-remote-userโ add a route based onREMOTE_USER.--route-refererโ add a route based onHTTP_REFERER.--route-labelโ add a routing label (for use withgoto).--route-ifโ add a route based on condition.--route-if-notโ add a route based on condition (negate version).--route-runโ always run the specified route action ๐
๐ช final routes ๐ช
these run last, periodt.
--final-routeโ add a final route.--final-route-statusโ add a final route for the specified status.--final-route-hostโ add a final route based onHostheader.--final-route-uriโ add a final route based onREQUEST_URI.--final-route-qsโ add a final route based onQUERY_STRING.--final-route-remote-addrโ add a final route based onREMOTE_ADDR.--final-route-user-agentโ add a final route based onHTTP_USER_AGENT.--final-route-remote-userโ add a final route based onREMOTE_USER.--final-route-refererโ add a final route based onHTTP_REFERER.--final-route-labelโ add a final routing label (for use withgoto).--final-route-ifโ add a final route based on condition.--final-route-if-notโ add a final route based on condition (negate version).--final-route-runโ always run the specified final route action.
๐ error routes ๐
for when things go sideways and we still want to be elegant about it.
--error-routeโ add an error route.--error-route-statusโ add an error route for the specified status.--error-route-hostโ add an error route based onHostheader.--error-route-uriโ add an error route based onREQUEST_URI.--error-route-qsโ add an error route based onQUERY_STRING.--error-route-remote-addrโ add an error route based onREMOTE_ADDR.--error-route-user-agentโ add an error route based onHTTP_USER_AGENT.--error-route-remote-userโ add an error route based onREMOTE_USER.--error-route-refererโ add an error route based onHTTP_REFERER.--error-route-labelโ add an error routing label (for use withgoto).--error-route-ifโ add an error route based on condition.--error-route-if-notโ add an error route based on condition (negate version).--error-route-runโ always run the specified error route action.
๐ธ response routes ๐ธ
--response-routeโ add a response route.--response-route-statusโ add a response route for the specified status.--response-route-hostโ add a response route based onHostheader.--response-route-uriโ add a response route based onREQUEST_URI.--response-route-qsโ add a response route based onQUERY_STRING.--response-route-remote-addrโ add a response route based onREMOTE_ADDR.--response-route-user-agentโ add a response route based onHTTP_USER_AGENT.--response-route-remote-userโ add a response route based onREMOTE_USER.--response-route-refererโ add a response route based onHTTP_REFERER.--response-route-labelโ add a response routing label (for use withgoto).--response-route-ifโ add a response route based on condition.--response-route-if-notโ add a response route based on condition (negate version).--response-route-runโ always run the specified response route action.--router-listโ list enabled routers โจ--routers-listโ list enabled routers
๐ error pages, websockets, chunked input ๐
--error-page-403โ add an error page (html) for managed403response.--error-page-404โ add an error page (html) for managed404response.--error-page-500โ add an error page (html) for managed500response.--websockets-ping-freqโ set the frequency (in seconds) of websockets automatic ping packets.--websocket-ping-freqโ set the frequency (in seconds) of websockets automatic ping packets.--websockets-pong-toleranceโ set the tolerance (in seconds) of websockets ping/pong subsystem.--websocket-pong-toleranceโ set the tolerance (in seconds) of websockets ping/pong subsystem.--websockets-max-sizeโ set the max allowed size of websocket messages (in Kbytes, default1024).--websocket-max-sizeโ set the max allowed size of websocket messages (in Kbytes, default1024).--chunked-input-limitโ set the max size of a chunked input part (default1MB, in bytes).--chunked-input-timeoutโ set default timeout for chunked input.
โฐ clocks ๐ฐ๏ธ
--clockโ set a clock source.--clock-listโ list enabled clocks. ๐๐๐--clocks-listโ bestie, this just lists all the enabled clocks โจ like a lil roster of every clock that's switched on rn.--add-headerโ sprinkles HTTP headers onto the response for you, automatically ๐ no manual labour.--rem-headerโ yeets the specified HTTP header out of the response, automatic mode ๐ซถ that header is gone.--del-headerโ literally the same vibe as--rem-header: it automatically removes the specified HTTP header from the response.--collect-headerโ stashes the specified response header into a request var ๐ syntax goes likeheader var.--response-header-collectโ same energy bestie: stores the specified response header in a request var (syntax:header var).--pull-headerโ stores the specified response header in a request var and rips it out of the response, like it never happened ๐ syntax:header var.--check-staticโ goes looking for static files in the directory you point at ๐.--check-static-docrootโ checks for static files inside the requestedDOCUMENT_ROOT๐ธ.--static-checkโ yep, checking for static files in the specified directory, iconic behaviour.--static-mapโ maps a mountpoint onto a static directory (or a file) ๐บ๏ธโจ.--static-map2โ like--static-mapbut it completely appends the requested resource to the docroot, no half measures ๐ฅ.--static-skip-extโ tells staticfile checks to skip the specified extension, bye bye ๐.--static-indexโ if someone requests a directory, this hunts down the specified file instead ๐ฆ.--static-safeโ if the file lives under the specified path, it skips the security checks ๐.--static-cache-pathsโ drops resolved paths into the uWSGI cache for however many seconds you say โฑ๏ธ.--static-cache-paths-nameโ uses the cache you specify for static paths, main character choice ๐.--mimefileโ sets the mime types file path (default/etc/mime.types) ๐.--mime-fileโ identical twin fr fr: 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 your supplied regexp matches the static file translation, it goes hunting for a gzip version ๐๏ธโจ.--static-gzip-allโ checks for a gzip version of, like, all the requested static files, no skips.--static-gzip-dirโ checks for a gzip version of all requested static files in the specified dir/prefix ๐.--static-gzip-prefixโ same deal bestie: 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โ yep, checks for a gzip version of all requested static files with the specified ext/suffix.--honour-rangeโ switches on support for the HTTPRangeheader ๐ respect the range.--offload-threadsโ sets how many offload threads to spawn (per-worker, default0) ๐งต.--offload-threadโ same thing, singular swag: sets the number of offload threads to spawn (per-worker, default0).--file-serve-modeโ sets the static file serving mode ๐.--fileserve-modeโ also sets the static file serving mode, twin energy.--disable-sendfileโ turns offsendfile()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 for spawning processes in requests) ๐ซถ.--close-on-exec2โ sets close-on-exec on server sockets (could be required for spawning processes in requests).--modeโ sets a uWSGI custom mode ๐.--envโ sets an environment variable ๐ฑ.--envdirโ loads a daemontools compatible envdir ๐.--early-envdirโ loads a daemontools compatible envdir ASAP โก no waiting around.--unenvโ unsets an environment variable, poof gone ๐จ.--vacuumโ tries to remove all of the generated file/sockets ๐งน spring cleaning.--file-writeโ writes the specified content to the specified file (syntax:file=value) before privileges drop ๐.--cgroupโ puts the processes into the specified cgroup ๐ซ.--cgroup-optโ sets a value in the specified cgroup option โ๏ธ.--cgroup-dir-modeโ sets permission for the cgroup directory (default is700) ๐.--namespaceโ runs in a new namespace under the specified rootfs ๐.--namespace-keep-mountโ keeps the specified mountpoint inside your namespace ๐.--nsโ runs in a new namespace under the specified rootfs (same as--namespace, cute short nickname).--namespace-netโ adds a network namespace ๐.--ns-netโ adds a network namespace, the short-name twin.--enable-proxy-protocolโ enablesPROXY1protocol support (only for http parsers) ๐ง.--reuse-portโ enables theREUSE_PORTflag on the socket (BSD only) ๐ก.--tcp-fast-openโ enables theTCP_FASTOPENflag on TCP sockets with the qlen value you give โก.--tcp-fastopenโ enables theTCP_FASTOPENflag on TCP sockets with the specified qlen value.--tcp-fast-open-clientโ usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if it's supported ๐.--tcp-fastopen-clientโ same: usessendto(..., MSG_FASTOPEN, ...)instead ofconnect()if supported.--zergโ attaches 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โ adds a cron task โฐ.--cron2โ adds a cron task, key=val syntax flavour ๐๏ธ.--unique-cronโ adds a unique cron task โจ one of a kind.--cron-harakiriโ sets the maximum time (in seconds) we wait for a cron command to complete โณ.--legion-cronโ adds a cron task that only runs when the instance is a lord of the specified legion ๐.--cron-legionโ adds a cron task runnable only when the instance is a lord of the specified legion.--unique-legion-cronโ adds a unique cron task runnable only when the instance is a lord of the specified legion ๐.--unique-cron-legionโ adds a unique cron task runnable only when the instance is a lord of the specified legion.--loopโ selects the uWSGI loop engine ๐.--loop-listโ lists the enabled loop engines ๐.--loops-listโ lists the enabled loop engines (same vibe, plural).--worker-execโ runs the specified command as a worker ๐ท.--worker-exec2โ runs the specified command as a 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 ๐ ride or die.--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 a legion lord node ๐.--legion-smart-attach-daemonโ same as--smart-attach-daemonbut the daemon runs only on a legion lord node.--legion-smart-attach-daemon2โ same as--smart-attach-daemon2but the daemon runs only on a 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โ loads uWSGI plugins ๐งฉ.--pluginโ loads uWSGI plugins (singular edition).--need-pluginsโ loads uWSGI plugins and exits on error ๐จ.--need-pluginโ loads uWSGI plugins, exit on error, singular.--plugins-dirโ adds a directory to the uWSGI plugin search path ๐๏ธ.--plugin-dirโ adds a directory to the uWSGI plugin search path, twin.--plugins-listโ lists the enabled plugins ๐.--plugin-listโ lists the enabled plugins, same.--autoloadโ tries to automatically load plugins when it finds unknown options ๐ช.--dlopenโ blindly loads a shared library ๐ no questions asked.--allowed-modifiersโ a 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โ forcesexit()of the instance ๐ช bye bestie.--cflagsโ reports uWSGICFLAGS(useful for building external plugins) ๐ ๏ธ.--dot-hโ dumps theuwsgi.hused for building the core (useful for building external plugins) ๐ฆ.--config-pyโ dumps theuwsgiconfig.pyused for building the core (useful for building external plugins) ๐.--build-pluginโ builds a uWSGI plugin for the current binary ๐๏ธ.--versionโ prints the uWSGI version ๐.--response-headers-limitโ sets the response header maximum size (default:64k) ๐.
And that's a wrap on the whole page, bestie ๐ญ๐ this was uwsgi_sqlite3, version 2.0.31-debian, dated July 2026 โ and yes that's the UWSGI_SQLITE3(1) manual you just devoured top to bottom. Go forth and configure, you absolute queen ๐โจ
๐ฆ where this page comes from
- ubuntu stonking: uwsgi-plugin-sqlite3 2.0.31-6build1 ยท GPL-2.0-only
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms