Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
clinicaltrials
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
david Chavalarias
clinicaltrials
Commits
a255158f
Commit
a255158f
authored
Feb 21, 2017
by
Romain Loth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add to conf the number of processes serving the app (workers)
parent
ee9d5a04
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
6 deletions
+15
-6
comex-run.sh
comex-run.sh
+3
-4
parametres_comex.dev.ini.default
config/parametres_comex.dev.ini.default
+4
-0
parametres_comex.ini
config/parametres_comex.ini
+4
-2
parametres_comex.prod.ini.default
config/parametres_comex.prod.ini.default
+4
-0
No files found.
comex-run.sh
View file @
a255158f
...
...
@@ -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
config/parametres_comex.dev.ini.default
View file @
a255158f
[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
...
...
config/parametres_comex.ini
View file @
a255158f
[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
config/parametres_comex.prod.ini.default
View file @
a255158f
[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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment