A
A
alexandre1082015-08-30 20:59:33
Python
alexandre108, 2015-08-30 20:59:33

How to run many applications at once under Gunicorn vs. uwsgi?

There was a task to launch several applications running Gunicorn. I used to use it for this uwsgiand there, launching applications looked pretty intuitive. The directory /etc/uwsgi/apps-enabledcontained files with settings for each project and after changes or, if necessary, reloaded uwsgi:
service uwsgi restart
And that's it. And gunicornin the documentation for aiohttp it is written that it is necessary to execute the command from the folder with the application:

gunicorn app:app -k aiohttp.worker.GunicornWebWorker -b localhost:80

But what to do if you don't want to run each project separately in some kind of screen-e, but you just want to do:
service gunicorn restart
What should be the setting for aiohttp in /etc/gunicorn.d?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alex Chistyakov, 2015-08-30
@alexandre108

Consider using supervisord or another supervisor to manage your Gunicorn instances.
Supervisord, however, is not well suited for managing non-foreground processes, so I personally prefer eye ( https://github.com/kostya/eye) , it also has a more understandable state machine for managed processes than supervisord.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question