How to run long cron jobs on App Engine flexible environment? -
i have app on app engine (flexible environment) , configured few cron jobs. these jobs should take several minutes see them failing after ~30 seconds (502 error). documentation not clear regarding max time of cron jobs (scheduling jobs cron.yaml), although seems "an http request invoked cron can run 24 hours".
any ideas of how overcome this? in advance
this answer own question.
the problem had had 1 gunicorn worker. app engine health checks happening every 30 seconds , there no worker able reply health checks, server restarted.
i should have added more workers in app.yaml file. example, i've added following line.
entrypoint: gunicorn -b :$port main:app --workers 12
hope helps.
Comments
Post a Comment