[CentralOH] Debian / Gunicorn

Brandon Lorenz blorenz at gmail.com
Thu Jun 6 17:11:38 CEST 2013


easy_install, but not into virtualenv (is this even possible?)


On Thu, Jun 6, 2013 at 11:10 AM, Douglas Stanley <
douglas.m.stanley at gmail.com> wrote:

> Let me ask this. How do most of you who use supervisor, install it? Do you
> use the distro packages, or also install it via pip/easy_install in a
> virtual env?
>
> Doug
>
>
> On Thu, May 23, 2013 at 9:26 AM, William McVey <wam at cisco.com> wrote:
>
>> On Wed, 2013-05-22 at 20:32 -0400, John Santiago wrote:
>> > Has anyone had any experience install gunicorn on debian. Trying to
>> > figure out the config. What is good set up for wsgi app?
>>
>> I run most of my wsgi services (a combination of flask and django)
>> through gunicorn on Ubuntu. I always install gunicorn into the
>> virtualenv associated with my app/site, so installation is rarely more
>> than a 'pip install gunicorn' from within the appropriate virtualenv.
>> (Technically, I use chef to do this for me, but that's a tangent.)
>> Similar to Brandon, I user supervisord to launch gunicorn, although I
>> invoke it slightly different:
>>
>>
>> In /etc/supervisor.d/gunicorn_MY_APP.conf
>>
>>         command=/srv/MY_APP_NAME/venv/bin/gunicorn_django --config
>> /srv/MY_APP_NAME/app/conf/webserver.py
>> /srv/MY_APP_NAME/app/MY_APP_site/settings.py
>>         process_name=%(program_name)s
>>         numprocs=1
>>         numprocs_start=0
>>         autostart=true
>>         autorestart=true
>>         directory=/srv/bundle_analysis
>>         serverurl=AUTO
>>         user=www-data
>>         startsecs=1
>>         startretries=3
>>
>> My gunicorn config file is webserver.py with variables like:
>>
>>         # What ports/sockets to listen on, and what options for them.
>>         bind = "0.0.0.0:8000"
>>         # The maximum number of pending connections
>>         backlog = 2048
>>         # What the timeout for killing busy workers is, in seconds
>>         timeout = 180
>>         # How long to wait for requests on a Keep-Alive connection, in
>>         seconds
>>         keepalive = 2
>>         # The maxium number of requests a worker will process before
>>         restarting
>>         max_requests = 0
>>         # Whether the app should be pre-loaded
>>         preload_app = False
>>         # How many worker processes
>>         workers = 8
>>         # Type of worker to use
>>         worker_class = "sync"
>>
>> The last argument to the command is the django settings.py file which I
>> assume you're familiar with.
>>
>>   -- William
>>
>> _______________________________________________
>> CentralOH mailing list
>> CentralOH at python.org
>> http://mail.python.org/mailman/listinfo/centraloh
>>
>
>
>
> --
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.gnu.org/philosophy/no-word-attachments.html
>
> _______________________________________________
> CentralOH mailing list
> CentralOH at python.org
> http://mail.python.org/mailman/listinfo/centraloh
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/centraloh/attachments/20130606/10e19274/attachment.html>


More information about the CentralOH mailing list