Commit a255158f authored by Romain Loth's avatar Romain Loth

add to conf the number of processes serving the app (workers)

parent ee9d5a04
......@@ -17,14 +17,13 @@ if grep --quiet docker /proc/1/cgroup
fi
# anyway we always need a simple web server to run the services
export COMEX_NWORKERS=$(grep -oP '(?<=COMEX_NWORKERS=).*' config/parametres_comex.ini)
echo "binding gunicorn to unix:/tmp/comex.sock"
gunicorn -b unix:/tmp/comex.sock services.main:app --workers 8
# TODO make n_workers a param in the ini file
gunicorn -b unix:/tmp/comex.sock services.main:app --workers $COMEX_NWORKERS
# export COMEX_HOST=$(grep -oP '(?<=COMEX_HOST=).*' config/parametres_comex.ini)
# export COMEX_PORT=$(grep -oP '(?<=COMEX_PORT=).*' config/parametres_comex.ini)
# echo "binding gunicorn to $COMEX_HOST:$COMEX_PORT"
# gunicorn -b $COMEX_HOST:$COMEX_PORT services.main:app --workers 8
# gunicorn -b $COMEX_HOST:$COMEX_PORT services.main:app --workers $COMEX_NWORKERS
[main]
#; how many "workers" (ie parallel instances of the server)
#; (cf. http://docs.gunicorn.org/en/stable/settings.html#worker-processes)
COMEX_NWORKERS=2
#; that's where we'll be serving our routes for web server
#; (must match apache/nginx reverse proxy **target**)
COMEX_HOST=0.0.0.0
......
[main]
#; how many "workers" (ie parallel instances of the server)
#; (cf. http://docs.gunicorn.org/en/stable/settings.html#worker-processes)
COMEX_NWORKERS=8
#; that's where we'll be serving our routes for web server
#; (must match inner nginx reverse proxy **target**)
COMEX_HOST=0.0.0.0
......@@ -29,8 +33,6 @@ SQL_PORT=3306
DOORS_HOST=doors.iscpif.fr
DOORS_PORT=443
#; DOORS_PORT (could be removed in PROD => 443 implicit because of https)
[content]
# used for all aggregations queries
HAPAX_THRESHOLD = 0
[main]
#; how many "workers" (ie parallel instances of the server)
#; (cf. http://docs.gunicorn.org/en/stable/settings.html#worker-processes)
COMEX_NWORKERS=8
#; that's where we'll be serving our routes for web server
#; (must match inner nginx reverse proxy **target**)
COMEX_HOST=0.0.0.0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment