A request is suspended for 6 hours, then completes

54 views
Skip to first unread message

Patrice Bertrand

unread,
Dec 1, 2021, 11:59:02 AM12/1/21
to Google App Engine
Here is a strange thing we are seeing repeatedly.   We have a batch job processing, handled on a GAE backend service, which ends up taking more than 6 hours, with only 6 minutes of actual processing.   The request is started by a Cloud Task.

In one case, as an example, the request is started at 15:58:00, it runs (with some records in the stdout log) until 15:59:36, then it is 'suspended', i.e. there is not a single record in the stdout log although this job does write on every loop).  Then suddenly we have records in the stdout log again, starting at 21:57:24, six hours later, and the handling of the request ends at 22:01:56.    Ultimately, it looks like the request has been running for a total of 1mn 36 seconds plus 4mn 32 seconds = 6mn 8 seconds, but with a six hour suspension in the middle.

In the stdout log, it is the same trace id all along, and we don't see any error occuring at the time of the suspension.

Does this ring a bell to anymone ?

Joshua Smith

unread,
Dec 1, 2021, 12:03:34 PM12/1/21
to google-a...@googlegroups.com
Did you check for a time.sleep(21600000) in the code?

:)

--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-appengi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/b005e3f3-5686-44f3-bd24-b61cb4f30980n%40googlegroups.com.

Sima (Cloud Platform Support)

unread,
Dec 11, 2021, 6:05:54 PM12/11/21
to Google App Engine

Hi,

As explained in this public documentation: all App Engine workers must send an HTTP response code (200-299) to the Cloud Tasks service, in this instance before a deadline based on the instance scaling type of the service: 10 minutes for automatic scaling or up to 24 hours for manual scaling. If a different response is sent, or no response, the task is retried.

So it seems it explains the behavior you are observing?

Sima (Cloud Platform Support)

unread,
Dec 11, 2021, 6:05:54 PM12/11/21
to Google App Engine

Hi,


As explained in this public documentation all App Engine workers must send an HTTP response code (200-299) to the Cloud Tasks service, in this instance before a deadline based on the instance scaling type of the service: 10 minutes for automatic scaling or up to 24 hours for manual scaling. If a different response is sent, or no response, the task is retried.


So it seems it explains the behavior you are observing?

On Wednesday, December 1, 2021 at 11:59:02 AM UTC-5 patrice....@experquiz.com wrote:
Reply all
Reply to author
Forward
0 new messages