Added a link to the issue tracker on GitHub.

This commit is contained in:
Paul J. Davis 2010-08-30 20:46:15 -04:00
parent 3165b0f87f
commit 8c917816aa
9 changed files with 116 additions and 50 deletions

View File

@ -23,6 +23,7 @@
<li><a href="faq.html">FAQ</a></li>
<li><a href="news.html">News</a></li>
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
</ul>
</div>
<div id="content">
@ -166,22 +167,23 @@ application's work load.</p>
<h4><a class="toc-backref" href="#contents">worker_class</a></h4>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">-k</span> STRING, <span class="pre">--worker-class</span> STRING</tt></li>
<li><tt class="docutils literal">egg:gunicorn#sync</tt></li>
<li><tt class="docutils literal">sync</tt></li>
</ul>
<p>The type of workers to use.</p>
<p>The default sync class should handle most 'normal' types of work loads.
You'll want to read <a class="reference external" href="http://gunicorn.org/design.html">http://gunicorn.org/design.html</a> for information on
<p>The default class (sync) should handle most 'normal' types of workloads.
You'll want to read <a class="reference external" href="http://gunicorn.org/design.hml">http://gunicorn.org/design.hml</a> for information on
when you might want to choose one of the other worker classes.</p>
<p>An string referring to a 'gunicorn.workers' entry point or a
MODULE:CLASS pair where CLASS is a subclass of
gunicorn.workers.base.Worker.</p>
<p>The default provided values are:</p>
<p>A string referring to one of the following bundled classes:</p>
<ul class="simple">
<li><tt class="docutils literal">egg:gunicorn#sync</tt></li>
<li><tt class="docutils literal">egg:gunicorn#eventlet</tt> - Requires eventlet &gt;= 0.9.7</li>
<li><tt class="docutils literal">egg:gunicorn#gevent</tt> - Requires gevent &gt;= 0.12.2 (?)</li>
<li><tt class="docutils literal">egg:gunicorn#tornado</tt> - Requires tornado &gt;= 0.2</li>
<li><tt class="docutils literal">sync</tt></li>
<li><tt class="docutils literal">eventlet</tt> - Requires eventlet &gt;= 0.9.7</li>
<li><tt class="docutils literal">gevent</tt> - Requires gevent &gt;= 0.12.2 (?)</li>
<li><tt class="docutils literal">tornado</tt> - Requires tornado &gt;= 0.2</li>
</ul>
<p>Optionally, you can provide your own worker by giving gunicorn a
MODULE:CLASS pair where CLASS is a subclass of
gunicorn.workers.base.Worker. This alternative syntax will load the
gevent class: <tt class="docutils literal">egg:gunicorn#gevent</tt></p>
</div>
<div class="section" id="worker-connections">
<h4><a class="toc-backref" href="#contents">worker_connections</a></h4>
@ -192,6 +194,19 @@ gunicorn.workers.base.Worker.</p>
<p>The maximum number of simultaneous clients.</p>
<p>This setting only affects the Eventlet and Gevent worker types.</p>
</div>
<div class="section" id="max-requests">
<h4><a class="toc-backref" href="#contents">max_requests</a></h4>
<ul class="simple">
<li><tt class="docutils literal"><span class="pre">--max-requests</span> INT</tt></li>
<li><tt class="docutils literal">0</tt></li>
</ul>
<p>The maximum number of requests a worker will process before restarting.</p>
<p>Any value greater than zero will limit the number of requests a work
will process before automatically restarting. This is a simple method
to help limit the damage of memory leaks.</p>
<p>If this is set to zero (the default) then the automatic worker
restarts are disabled.</p>
</div>
<div class="section" id="timeout">
<h4><a class="toc-backref" href="#contents">timeout</a></h4>
<ul class="simple">
@ -368,6 +383,18 @@ module.</p>
</div>
<div class="section" id="server-hooks">
<h3><a class="toc-backref" href="#contents">Server Hooks</a></h3>
<div class="section" id="when-ready">
<h4><a class="toc-backref" href="#contents">when_ready</a></h4>
<ul>
<li><pre class="first literal-block">
def def_start_server(server):
pass
</pre>
</li>
</ul>
<p>Called just after the server is started.</p>
<p>The callable needs to accept a single instance variable for the Arbiter.</p>
</div>
<div class="section" id="pre-fork">
<h4><a class="toc-backref" href="#contents">pre_fork</a></h4>
<ul>
@ -386,7 +413,7 @@ new Worker.</p>
<ul>
<li><pre class="first literal-block">
def def_post_fork(server, worker):
server.log.info(&quot;Worker spawned (pid: %s)&quot; % worker.pid)
pass
</pre>
</li>
</ul>
@ -394,30 +421,57 @@ def def_post_fork(server, worker):
<p>The callable needs to accept two instance variables for the Arbiter and
new Worker.</p>
</div>
<div class="section" id="when-ready">
<h4><a class="toc-backref" href="#contents">when_ready</a></h4>
<ul>
<li><pre class="first literal-block">
def def_start_server(server):
pass
</pre>
</li>
</ul>
<p>Called just after the server is started.</p>
<p>The callable needs to accept a single instance variable for the Arbiter.</p>
</div>
<div class="section" id="pre-exec">
<h4><a class="toc-backref" href="#contents">pre_exec</a></h4>
<ul>
<li><pre class="first literal-block">
def def_pre_exec(server):
server.log.info(&quot;Forked child, reexecuting.&quot;)
pass
</pre>
</li>
</ul>
<p>Called just before a new master process is forked.</p>
<p>The callable needs to accept a single instance variable for the Arbiter.</p>
</div>
<div class="section" id="pre-request">
<h4><a class="toc-backref" href="#contents">pre_request</a></h4>
<ul>
<li><pre class="first literal-block">
def def_pre_request(worker, req):
worker.log.debug(&quot;%s %s&quot; % (req.method, req.path))
</pre>
</li>
</ul>
<p>Called just before a worker processes the request.</p>
<p>The callable needs to accept two instance variables for the Worker and
the Request.</p>
</div>
<div class="section" id="post-request">
<h4><a class="toc-backref" href="#contents">post_request</a></h4>
<ul>
<li><pre class="first literal-block">
def def_post_request(worker, req):
pass
</pre>
</li>
</ul>
<p>Called after a worker processes the request.</p>
<p>The callable needs to accept two instance variables for the Worker and
the Request.</p>
</div>
<div class="section" id="worker-exit">
<h4><a class="toc-backref" href="#contents">worker_exit</a></h4>
<ul>
<li><pre class="first literal-block">
def def_worker_exit(server, worker):
pass
</pre>
</li>
</ul>
<p>Called just after a worker has been exited.</p>
<p>The callable needs to accept two instance variables for the Arbiter and
the just-exited Worker.</p>
</div>
</div>
</div>
</div>
@ -447,40 +501,44 @@ def def_pre_exec(server):
<li><a class="reference internal" href="#workers" id="id13">workers</a></li>
<li><a class="reference internal" href="#worker-class" id="id14">worker_class</a></li>
<li><a class="reference internal" href="#worker-connections" id="id15">worker_connections</a></li>
<li><a class="reference internal" href="#timeout" id="id16">timeout</a></li>
<li><a class="reference internal" href="#keepalive" id="id17">keepalive</a></li>
<li><a class="reference internal" href="#max-requests" id="id16">max_requests</a></li>
<li><a class="reference internal" href="#timeout" id="id17">timeout</a></li>
<li><a class="reference internal" href="#keepalive" id="id18">keepalive</a></li>
</ul>
</li>
<li><a class="reference internal" href="#debugging" id="id18">Debugging</a><ul>
<li><a class="reference internal" href="#debug" id="id19">debug</a></li>
<li><a class="reference internal" href="#spew" id="id20">spew</a></li>
<li><a class="reference internal" href="#debugging" id="id19">Debugging</a><ul>
<li><a class="reference internal" href="#debug" id="id20">debug</a></li>
<li><a class="reference internal" href="#spew" id="id21">spew</a></li>
</ul>
</li>
<li><a class="reference internal" href="#server-mechanics" id="id21">Server Mechanics</a><ul>
<li><a class="reference internal" href="#preload-app" id="id22">preload_app</a></li>
<li><a class="reference internal" href="#daemon" id="id23">daemon</a></li>
<li><a class="reference internal" href="#pidfile" id="id24">pidfile</a></li>
<li><a class="reference internal" href="#user" id="id25">user</a></li>
<li><a class="reference internal" href="#group" id="id26">group</a></li>
<li><a class="reference internal" href="#umask" id="id27">umask</a></li>
<li><a class="reference internal" href="#tmp-upload-dir" id="id28">tmp_upload_dir</a></li>
<li><a class="reference internal" href="#server-mechanics" id="id22">Server Mechanics</a><ul>
<li><a class="reference internal" href="#preload-app" id="id23">preload_app</a></li>
<li><a class="reference internal" href="#daemon" id="id24">daemon</a></li>
<li><a class="reference internal" href="#pidfile" id="id25">pidfile</a></li>
<li><a class="reference internal" href="#user" id="id26">user</a></li>
<li><a class="reference internal" href="#group" id="id27">group</a></li>
<li><a class="reference internal" href="#umask" id="id28">umask</a></li>
<li><a class="reference internal" href="#tmp-upload-dir" id="id29">tmp_upload_dir</a></li>
</ul>
</li>
<li><a class="reference internal" href="#logging" id="id29">Logging</a><ul>
<li><a class="reference internal" href="#logfile" id="id30">logfile</a></li>
<li><a class="reference internal" href="#loglevel" id="id31">loglevel</a></li>
<li><a class="reference internal" href="#logging" id="id30">Logging</a><ul>
<li><a class="reference internal" href="#logfile" id="id31">logfile</a></li>
<li><a class="reference internal" href="#loglevel" id="id32">loglevel</a></li>
</ul>
</li>
<li><a class="reference internal" href="#process-naming" id="id32">Process Naming</a><ul>
<li><a class="reference internal" href="#proc-name" id="id33">proc_name</a></li>
<li><a class="reference internal" href="#default-proc-name" id="id34">default_proc_name</a></li>
<li><a class="reference internal" href="#process-naming" id="id33">Process Naming</a><ul>
<li><a class="reference internal" href="#proc-name" id="id34">proc_name</a></li>
<li><a class="reference internal" href="#default-proc-name" id="id35">default_proc_name</a></li>
</ul>
</li>
<li><a class="reference internal" href="#server-hooks" id="id35">Server Hooks</a><ul>
<li><a class="reference internal" href="#pre-fork" id="id36">pre_fork</a></li>
<li><a class="reference internal" href="#post-fork" id="id37">post_fork</a></li>
<li><a class="reference internal" href="#when-ready" id="id38">when_ready</a></li>
<li><a class="reference internal" href="#pre-exec" id="id39">pre_exec</a></li>
<li><a class="reference internal" href="#server-hooks" id="id36">Server Hooks</a><ul>
<li><a class="reference internal" href="#when-ready" id="id37">when_ready</a></li>
<li><a class="reference internal" href="#pre-fork" id="id38">pre_fork</a></li>
<li><a class="reference internal" href="#post-fork" id="id39">post_fork</a></li>
<li><a class="reference internal" href="#pre-exec" id="id40">pre_exec</a></li>
<li><a class="reference internal" href="#pre-request" id="id41">pre_request</a></li>
<li><a class="reference internal" href="#post-request" id="id42">post_request</a></li>
<li><a class="reference internal" href="#worker-exit" id="id43">worker_exit</a></li>
</ul>
</li>
</ul>
@ -494,4 +552,4 @@ def def_pre_exec(server):
</div>
</div>
</body>
</html>
</html>

View File

@ -23,6 +23,7 @@
<li><a href="faq.html">FAQ</a></li>
<li><a href="news.html">News</a></li>
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
</ul>
</div>
<div id="content">

View File

@ -23,6 +23,7 @@
<li><a href="faq.html">FAQ</a></li>
<li><a href="news.html">News</a></li>
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
</ul>
</div>
<div id="content">

View File

@ -23,6 +23,7 @@
<li><a href="faq.html">FAQ</a></li>
<li><a href="news.html">News</a></li>
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
</ul>
</div>
<div id="content">

View File

@ -18,6 +18,7 @@
<li><a href="faq.html">FAQ</a></li>
<li><a href="news.html">News</a></li>
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
</ul>
</div>
<div id="header">

View File

@ -23,6 +23,7 @@
<li><a href="faq.html">FAQ</a></li>
<li><a href="news.html">News</a></li>
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
</ul>
</div>
<div id="content">

View File

@ -23,6 +23,7 @@
<li><a href="faq.html">FAQ</a></li>
<li><a href="news.html">News</a></li>
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
</ul>
</div>
<div id="content">

View File

@ -23,6 +23,7 @@
<li><a href="faq.html">FAQ</a></li>
<li><a href="news.html">News</a></li>
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
</ul>
</div>
<div id="content">

View File

@ -23,6 +23,7 @@
<li><a href="faq.html">FAQ</a></li>
<li><a href="news.html">News</a></li>
<li><a href="http://github.com/benoitc/gunicorn/">Code</a></li>
<li><a href="http://github.com/benoitc/gunicorn/issues">Issues</a></li>
</ul>
</div>
<div id="content">