3 ms·
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-- #
by countbayes 7y ago
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' 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" ]
- doctoboggan 7y agoThanks for the pointer. I was messing around with --preload and --timeout flags and they seemed to work, although I think that isn't fixing the root problem.