Discussion:
[google-appengine] cron.yaml: is there a max limit to min_backoff_seconds?
Mark Meyer
2018-11-28 20:14:45 UTC
Permalink
I am using the following cron.yaml file and attempting to have the retries
start at 2 minutes after a failure (I'm using Python3 in the standard
environment).

cron:
- description: "daily call"
url: /twilio/start_call/
timezone: "America/Anchorage"
schedule: every day 17:00
retry_parameters:
min_backoff_seconds: 120.0
max_backoff_seconds: 360.0
max_doublings: 3


The behavior I'm expecting when the url returns 503 is a 120 second
interval and then a retry. What I am getting retries at (quite precise) one
minute intervals. I don't see anything in the docs about a time limit. I
hope I'm not doing something obviously wrong, but I've been starting at it
and trying variations without any success.

The logs I am see look like:

2018-11-26 17:00:00.764 AKST GET 503 178 B 970 ms AppEngine-Google (+http://code.google.com/appengine)
/twilio/start_call/
2018-11-26 17:01:01.939 AKST GET 503 178 B 704 ms
AppEngine-Google;(+http://code.google.com/appengine) /twilio/start_call/
2018-11-26 17:02:02.747 AKST GET 503 178 B 850 ms
AppEngine-Google;(+http://code.google.com/appengine) /twilio/start_call/
2018-11-26 17:03:03.702 AKST GET 503 178 B 666 ms
AppEngine-Google;(+http://code.google.com/appengine) /twilio/start_call/
2018-11-26 17:04:04.477 AKST GET 200 189 B 65 ms AppEngine-Google;
(+http://code.google.com/appengine) /twilio/start_call/

Is there something I'm missing?

Thank you.
--
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-appengine+***@googlegroups.com.
To post to this group, send email to google-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/ef233136-0ebc-4577-aa88-64cb1637d7d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'George (Cloud Platform Support)' via Google App Engine
2018-11-29 21:07:07 UTC
Permalink
Hello Mark,

Your minimum retry interval for Cron is set to 2 minutes, and I have the
feeling this is quite high, without any reasonable explanation to support
my intuition. The expected value seems to be in the order of seconds. Three
repeats for would imply 4 minute, 8 and then 16 minutes: quite a long time.
What happens if you set the value of min_backoff_seconds to a few seconds,
rather than a minute? It would be of interest to see if your value of
min_backoff_seconds is then taken into consideration, or the minute repeat
interval will be seen again in logs.

If you'd like us to take a closer look at your issue, a copy of your app's
code and Cron-related detail, together with relevant instructions is
needed, in view of local reproduction of the error. This is better
submitted by means of a similar issue in the Public Issue Tracker
<https://issuetracker.google.com/>. This way, confidential details such as
project ID can be safely transmitted, and you should be able to follow
developments and solutions in the same thread.
--
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-appengine+***@googlegroups.com.
To post to this group, send email to google-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/e3d8758a-0b25-4e04-bf15-3aa9f12476fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
'Bart Hazer' via Google App Engine
2018-11-29 23:15:57 UTC
Permalink
Hi Mark - Responses with HTTP status 503 are a bit of a special case that
is not documented very well. Those are retried every minute regardless of
your retry_parameters. Retries for responses with all other non-200 status
codes are governed by the specified retry_parameters. That is alluded to
somewhat
here: https://cloud.google.com/appengine/docs/standard/python/config/cron#retrying_cron_jobs_that_fail

On Thursday, November 29, 2018 at 1:07:07 PM UTC-8, George (Cloud Platform
Post by 'George (Cloud Platform Support)' via Google App Engine
Hello Mark,
Your minimum retry interval for Cron is set to 2 minutes, and I have the
feeling this is quite high, without any reasonable explanation to support
my intuition. The expected value seems to be in the order of seconds. Three
repeats for would imply 4 minute, 8 and then 16 minutes: quite a long time.
What happens if you set the value of min_backoff_seconds to a few seconds,
rather than a minute? It would be of interest to see if your value of
min_backoff_seconds is then taken into consideration, or the minute repeat
interval will be seen again in logs.
If you'd like us to take a closer look at your issue, a copy of your app's
code and Cron-related detail, together with relevant instructions is
needed, in view of local reproduction of the error. This is better
submitted by means of a similar issue in the Public Issue Tracker
<https://issuetracker.google.com/>. This way, confidential details such
as project ID can be safely transmitted, and you should be able to follow
developments and solutions in the same thread.
--
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-appengine+***@googlegroups.com.
To post to this group, send email to google-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/41a66695-c6c9-4d17-9b2f-b588cc7214d9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Mark Meyer
2018-11-30 01:47:18 UTC
Permalink
Bart, thank you! That was it. Some how I misread the docs and to mean you
needed to send a 503. On re-reading it, that's obviously not what it says.
I appreciate the help.
Post by 'Bart Hazer' via Google App Engine
Hi Mark - Responses with HTTP status 503 are a bit of a special case that
is not documented very well. Those are retried every minute regardless of
your retry_parameters. Retries for responses with all other non-200 status
codes are governed by the specified retry_parameters. That is alluded to
https://cloud.google.com/appengine/docs/standard/python/config/cron#retrying_cron_jobs_that_fail
On Thursday, November 29, 2018 at 1:07:07 PM UTC-8, George (Cloud Platform
Post by 'George (Cloud Platform Support)' via Google App Engine
Hello Mark,
Your minimum retry interval for Cron is set to 2 minutes, and I have the
feeling this is quite high, without any reasonable explanation to support
my intuition. The expected value seems to be in the order of seconds. Three
repeats for would imply 4 minute, 8 and then 16 minutes: quite a long time.
What happens if you set the value of min_backoff_seconds to a few seconds,
rather than a minute? It would be of interest to see if your value of
min_backoff_seconds is then taken into consideration, or the minute repeat
interval will be seen again in logs.
If you'd like us to take a closer look at your issue, a copy of your
app's code and Cron-related detail, together with relevant instructions is
needed, in view of local reproduction of the error. This is better
submitted by means of a similar issue in the Public Issue Tracker
<https://issuetracker.google.com/>. This way, confidential details such
as project ID can be safely transmitted, and you should be able to follow
developments and solutions in the same thread.
--
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-appengine+***@googlegroups.com.
To post to this group, send email to google-***@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/326efea6-9213-4b18-a235-c27b025ade90%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...