Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

gunicorn_django(1) [debian man page]

GUNICORN_DJANGO(1)					User Contributed Perl Documentation					GUNICORN_DJANGO(1)

NAME
gunicorn_django - Event-based HTTP/WSGI server, Django application entry-point SYNOPSIS
gunicorn_django [OPTIONS] [SETTINGS_PATH] OPTIONS
-c CONFIG, --config=CONFIG Config file. [none] -b BIND, --bind=BIND Address to listen on. Ex. 127.0.0.1:8000 or unix:/tmp/gunicorn.sock -w WORKERS, --workers=WORKERS Number of workers to spawn. [1] -a ARBITER, --arbiter=ARBITER gunicorn arbiter entry point or module [egg:gunicorn#main] -p PIDFILE, --pid=PIDFILE Set the background PID FILE -D, --daemon Run daemonized in the background. -m UMASK, --umask=UMASK Define umask of daemon process -u USER, --user=USER Change worker user -g GROUP, --group=GROUP Change worker group -n PROC_NAME, --name=PROC_NAME Process name --log-level=LOGLEVEL Log level below which to silence messages. [info] --log-file=LOGFILE Log to a file. - equals stdout. [-] d, --debug Debug mode. only 1 worker. --version Show program's version number and exit -h, --help show this help message and exit DESCRIPTION
Green Unicorn (gunicorn) is an HTTP/WSGI server designed to serve fast clients or sleepy applications. That is to say; behind a buffering front-end server such as nginx or lighttpd. * Optional support for Eventlet and Gevent to provide asynchronous long-polling ("Comet") connections. * Process management: Gunicorn reaps and restarts workers that die. * 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, allowing upload progress notifications or stream-based protocols over HTTP TUNING
KERNEL PARAMETERS There are various kernel parameters that you might want to tune in order to deal with a large number of simultaneous connections. Generally these should only affect sites with a large number of concurrent requests and apply to any sort of network server you may be running. They're listed here for ease of reference. 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 uncertain. INCREASING THE FILE DESCRIPTOR LIMIT One of the first settings that usually needs to be bumped is the maximum number of open file descriptors for a given process. For the confused out there, remember that Unices treat sockets as files. $ 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 happen to have a stampede of clients that fill up this queue new connections will eventually start getting dropped. $ 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. SEE ALSO
gunicorn(1) perl v5.14.2 2012-10-04 GUNICORN_DJANGO(1)

Check Out this Related Man Page

Starman(3pm)						User Contributed Perl Documentation					      Starman(3pm)

NAME
Starman - High-performance preforking PSGI/Plack web server SYNOPSIS
# Run app.psgi with the default settings > starman # run with Server::Starter > start_server --port 127.0.0.1:80 -- starman --workers 32 myapp.psgi # UNIX domain sockets > starman --listen /tmp/starman.sock DESCRIPTION
Starman is a PSGI perl web server that has unique features such as: High Performance Uses the fast XS/C HTTP header parser Preforking Spawns workers preforked like most high performance UNIX servers do. Starman also reaps dead children and automatically restarts the worker pool. Signals Supports "HUP" for graceful worker restarts, and "TTIN"/"TTOU" to dynamically increase or decrease the number of worker processes, as well as "QUIT" to gracefully shutdown the worker processes. Superdaemon aware Supports Server::Starter for hot deploy and graceful restarts. Multiple interfaces and UNIX Domain Socket support Able to listen on multiple intefaces including UNIX sockets. Small memory footprint Preloading the applications with "--preload-app" command line option enables copy-on-write friendly memory management. Also, the minimum memory usage Starman requires for the master process is 7MB and children (workers) is less than 3.0MB. PSGI compatible Can run any PSGI applications and frameworks HTTP/1.1 support Supports chunked requests and responses, keep-alive and pipeline requests. UNIX only This server does not support Win32. PERFORMANCE
Here's a simple benchmark using "Hello.psgi". -- server: Starman (workers=10) Requests per second: 6849.16 [#/sec] (mean) -- server: Twiggy Requests per second: 3911.78 [#/sec] (mean) -- server: AnyEvent::HTTPD Requests per second: 2738.49 [#/sec] (mean) -- server: HTTP::Server::PSGI Requests per second: 2218.16 [#/sec] (mean) -- server: HTTP::Server::PSGI (workers=10) Requests per second: 2792.99 [#/sec] (mean) -- server: HTTP::Server::Simple Requests per second: 1435.50 [#/sec] (mean) -- server: Corona Requests per second: 2332.00 [#/sec] (mean) -- server: POE Requests per second: 503.59 [#/sec] (mean) This benchmark was processed with "ab -c 10 -t 1 -k" on MacBook Pro 13" late 2009 model on Mac OS X 10.6.2 with perl 5.10.0. YMMV. NAMING
Starman? The name Starman is taken from the song (Star na Otoko) by the Japanese rock band Unicorn (yes, Unicorn!). It's also known as a song by David Bowie, a power-up from Super Mario Brothers and a character from Earthbound, all of which I love. Why the cute name instead of more descriptive namespace? Are you on drugs? I'm sick of naming Perl software like HTTP::Server::PSGI::How::Its::Written::With::What::Module and people call it HSPHIWWWM on IRC. It's hard to say on speeches and newbies would ask questions what they stand for every day. That's crazy. This module actually includes the longer alias and an empty subclass HTTP::Server::PSGI::Net::Server::PreFork for those who like to type more ::'s. It would actually help you find this software by searching for PSGI Server Prefork on CPAN, which i believe is a good thing. Yes, maybe I'm on drugs. We'll see. AUTHOR
Tatsuhiko Miyagawa <miyagawa@bulknews.net> Andy Grundman wrote Catalyst::Engine::HTTP::Prefork, which this module is heavily based on. Kazuho Oku wrote Net::Server::SS::PreFork that makes it easy to add Server::Starter support to this software. LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
Plack Catalyst::Engine::HTTP::Prefork Net::Server::PreFork perl v5.14.2 2012-06-25 Starman(3pm)
Man Page