Re: Starting Web Servers using socket FDs
Tarek Ziadé <tarek-A/[email protected]> Tue, 05 Jun 2012 12:33:32 +0200
| Newsgroups | gmane.comp.python.web |
|---|---|
| Message-ID | <[email protected]> |
On 6/5/12 12:31 PM, Benoit Chesneau wrote: > On Tue, Jun 5, 2012 at 12:26 PM, Tarek Ziadé<tarek-A/[email protected]> wrote: >> On 6/5/12 11:46 AM, Roberto De Ioris wrote: >>> ... >>> >>> Gunicorn can already bind (or better, accept) from file descriptors >>> specifying an environment variable. >> I don't think you can start gunicorn using a file descriptor, or I failed to >> do it. The best I was able to do was to create a small wsgi server >> using Gunicorn as a lib. >> >> Gunicorn uses an environment variable when it respawns workers but it does >> not offer it as a public option as far as I understand how it works >> >> > export GUNICORN_FD=<your fd> > > and then gunicorn will use this file descriptor when it starts. > > But it should be possible to pass it directly using a config option if > it's needed. What you be great then is to be able to run Gunicorn as a single process without having it forking workers, because the main goal is to be able to manage that process directly in Circus -- e.g. skip all the arbiter part in Gunicorn My attempt at this was this hack : https://github.com/tarekziade/chaussette/commit/075003a24ffe92253da60aafc6f99062e0af267d#diff-3 Cheers Tarek > > - benoît _______________________________________________ Web-SIG mailing list [email protected] Web SIG: http://www.python.org/sigs/web-sig Unsubscribe: http://mail.python.org/mailman/options/web-sig/gcpw-web-sig%40m.gmane.org