How to run long cron jobs on App Engine flexible environment?

邮差的信 提交于 2019-12-06 11:57:06

This is an answer to my own question.

The problem I had was that I only had one Gunicorn worker. The App Engine health checks were happening every 30 seconds and there was no worker able to reply to the health checks, so the server was restarted.

I should have added more workers in the app.yaml file. For example, I've added the following line.

entrypoint: gunicorn -b :$PORT main:app --workers 12

Hope this helps.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!