Skip to content Skip to sidebar Skip to footer

Taskqueue For Long Running Tasks In Flexible App Engine

I am building an app using Flexible App Engine and Python3. In the standard appengine, if you needed to run a task that was longer than 60s, you could either use taskqueue, or the

Solution 1:

I had almost exactly the same problem Increase time to run code for Google flexible app engine delaying DeadlineExceededError , thinking that the problem was because of this deadlineexceedederror

but because this question asked about taskqueue etc, i thought maybe the answer is different. Actually, it boils down to the fact that in flexible environment with python3 this task running longer than 60s is not a constraint since all the code runs in docker containers. Thus, running a taskqueue etc might not even be needed.

It might be worth to check the gunicorn entrypoint config. In the app.yamlfile add the -t option and the number of seconds allowed before timeout.

runtime: pythonenv: flexentrypoint: gunicorn -t 120 -b :$PORT main:app

this solved the issue for me, now a code which was longer was running without an exit.

Post a Comment for "Taskqueue For Long Running Tasks In Flexible App Engine"