From 37a2bbf2896c80694cdbe09c7f45c72ddfc48df2 Mon Sep 17 00:00:00 2001 From: TimMcCauley Date: Mon, 6 Aug 2018 13:29:18 +0200 Subject: [PATCH] Replacing sync in favor of gevent flask, closes #30 --- gunicorn_config.py | 6 +++++- requirements.txt | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gunicorn_config.py b/gunicorn_config.py index bab951b..e068eef 100644 --- a/gunicorn_config.py +++ b/gunicorn_config.py @@ -1,3 +1,7 @@ bind = "0.0.0.0:5000" # Generally we recommend (2 x $num_cores) + 1 as the number of workers to start off with -workers = 2 +workers = 4 +worker_class = 'gevent' +worker_connections = 1000 +timeout = 30 +keepalive = 2 diff --git a/requirements.txt b/requirements.txt index 860b962..8099749 100755 --- a/requirements.txt +++ b/requirements.txt @@ -14,4 +14,5 @@ pyproj==1.9.5.1 scrapy==1.5.0 gunicorn==19.7.1 flask-cors==3.0.3 +gevent==1.3.5 git+https://github.com/lechup/imposm-parser.git@python3 \ No newline at end of file