Better HN
topnewbestaskshowjobs
Log inSign up

countbayes

3 karma · joined Mar 8, 2020 (6y ago) · 1 submissions

Submissions

comment 6y ago · link · parent

We had that problem and hacked around it with the Dockerfile instructions below, if you find a better solution that would be great :)

--Dockerfile snippet--

# Cloud Run concurrency is assumed to be set to 10 but we don't assume that is exact

# See 'https://github.com/benoitc/gunicorn/issues/1801' so disabling concurrency

ENV GUNICORN_CMD_ARGS="-c gunicorn_config.py --workers 1 --threads 1 --timeout 120 --preload"

CMD [ "gunicorn", "pkg.http:app" ]

# Or just use Flask directly if concurrency is set to 1

#CMD [ "python", "cmd/server/main.py" ]