Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cloud Tasks retries task even though max attempts = 1 in queue configuration

My queue is running unexpected retries on tasks where attemptDispatch results in an error as seen in attemptResponse. Normally the queue doesn't execute retries, which is desired behaviour. For this single task it does; the only difference I notice is that the reason of the failed attempt is an out of memory issue instead of a controlled error response:

Screenshot 2023-10-23 at 15.14.50.png

 My queue is configured with max attempts = 1, see:

Screenshot 2023-10-23 at 15.10.09.png

The attemptDispatchLog that Google Cloud Tasks writes shows me the following: 

Screenshot 2023-10-23 at 15.10.49.png

 This is unexpected as the maxAttempts should most logically be set to 1.

Retries are executed (also unexpected)

Screenshot 2023-10-23 at 15.17.33.png

Screenshot 2023-10-23 at 15.18.46.png

 This is causing duplicate runs that are not expected, which is causing trouble in our system. We are moving towards idempotent jobs as suggested by the Cloud Tasks documentation. But still we would like to know what is going on in this scenario.

3 3 3,319
3 REPLIES 3
Top Labels in this Space
Top Solution Authors