Hacker Newsnew | past | comments | ask | show | jobs | submit | countbayes's commentslogin

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" ]


Thanks 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.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: