GUNICORN_PASTER(1)
π GUNICORN_PASTER(1) β¨
okay bestie, welcome to the gunicorn_paster page π this is a User Contributed Perl Documentation joint, and it's about the Paste application entry-point flavor of gunicorn. buckle up, it's giving server-core π¦
πΈ NAME πΈ
gunicorn_paster β an event-based HTTP/WSGI server, specifically the Paste application entry-point. no cap, that's literally what it is π«Ά
π SYNOPSIS π
gunicorn_paster [OPTIONS] [SETTINGS_PATH]
like... options first, then your settings path, mwah π
β¨ OPTIONS β¨
every single one of these, no skipping, we don't do that here π
-c CONFIG,--config=CONFIGβ the config file. default is[none], so like, none π«-b BIND,--bind=BINDβ the address to listen on. e.g.127.0.0.1:8000orunix:/tmp/gunicorn.sockπ₯-w WORKERS,--workers=WORKERSβ how many workers to spawn. default[1]β yes, just one, humble of her π-a ARBITER,--arbiter=ARBITERβ the gunicorn arbiter entry point or module. default[egg:gunicorn#main]πΈ-p PIDFILE,--pid=PIDFILEβ set the background PID FILE π-D,--daemonβ run daemonized, in the background, living her life π¦-m UMASK,--umask=UMASKβ define the umask of the daemon process π-u USER,--user=USERβ change the worker user π€-g GROUP,--group=GROUPβ change the worker group π₯-n PROC_NAME,--name=PROC_NAMEβ process name π·οΈ--log-level=LOGLEVELβ log level below which messages get silenced. default[info]π€«--log-file=LOGFILEβ log to a file.-equals stdout. default[-]πd,--debugβ debug mode. only 1 worker. (yes, the original literally writes it asd, we are being faithful, don't come for me π)--versionβ show the program's version number and exit π-h,--helpβ show this help message and exit π«Ά
π DESCRIPTION π
Green Unicorn (gunicorn) is an HTTP/WSGI server built to serve fast clients or sleepy applications. and what that means is: it lives behind a buffering front-end server, like nginx or lighttpd. periodt π
- Optional support for Eventlet and Gevent so you get asynchronous long-polling ("Comet") connections β‘
- Process management: Gunicorn reaps and restarts workers that die. it's giving main character energy, she's not letting anyone ghost π
- Easy integration with Django and Paster compatible applications (Pylons, TurboGears 2, etc. π
- Load balancing via pre-fork and a shared socket βοΈ
- Graceful worker process restarts ποΈ
- Upgrading without losing connections β¨
- Decode chunked transfers on-the-fly, which allows upload progress notifications or stream-based protocols over HTTP π‘
π§ TUNING π§
π§ KERNEL PARAMETERS π§
there are various kernel parameters you might wanna tune to deal with a large number of simultaneous connections. ngl, these generally only affect sites with a large number of concurrent requests, and they apply to any sort of network server you may be running. they're listed here purely for ease of reference, iykyk π
β οΈ the commands listed are tested under Mac OS X 10.6. your flavor of Unix may use slightly different flags. always reference the appropriate man pages if you're uncertain, bestie, don't guess π
π INCREASING THE FILE DESCRIPTOR LIMIT π
one of the first settings that usually needs a bump is the max number of open file descriptors for a given process. and for the confused ones out there β remember, Unices treat sockets as files. they're the same thing, fr fr π
$ sudo ulimit -n 1024
π INCREASING THE LISTEN QUEUE SIZE π
listening sockets have an associated queue of incoming connections that are waiting to be accepted. if you get a whole stampede of clients that fill up this queue, new connections will eventually start getting dropped. tragic π
$ sudo sysctl -w kern.ipc.somaxconn="1024"
π¦ WIDENING THE EPHEMERAL PORT RANGE π¦
after a socket is closed it eventually enters the TIME_WAIT state. this can become an issue after a prolonged burst of client activity. eventually the ephemeral port range is used up, which can cause new connections to stall while they wait for a valid port π΅
π this setting is generally only required on machines that are being used to test a network server. so like, lab vibes only π§ͺ
π SEE ALSO π
gunicorn(1)β go read that one too, bestie π
and that's the whole page, you ate that πβ¨ this was GUNICORN_PASTER(1), from perl v5.38.2, dated 2024-08-14. mwah, go run your server π π«Ά
π¦ where this page comes from
- debian trixie: gunicorn 23.0.0-1 Β· MIT
- ubuntu questing: gunicorn 23.0.0-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms