App Engine:失败任务队列的默认重试参数是什么
App Engine: What are the Default Retry Parameters for Failed Taskqueues
Google App Engine 具有强大的参数集,可以自动重试分布式任务队列中失败的任务。而 documentation explains what these parameters do,它没有指定默认参数是什么。
任务队列的重试参数的默认值是多少。更具体地说,以下重试参数的默认值是什么:
task_retry_limit
task_age_limit
min_backoff_seconds
max_backoff_seconds
max_doublings
默认行为在this section的开头描述:
Tasks executing in the task queue can fail for many reasons. If a task
fails to execute (by returning any HTTP status code outside of the
range 200–299), App Engine retries the task until it succeeds. By
default, the system gradually reduces the retry rate to avoid flooding
your application with too many requests, but schedules retry attempts
to recur at a maximum of once per hour until the task succeeds.
根据此描述并通过观察推送队列中实际失败任务的日志,没有重试配置(因此对所有这些参数使用默认值)我 "derived" 这些值:
- task_retry_limit: None
- task_age_limit: None
- min_backoff_seconds: 0.1
- max_backoff_seconds: 3600
- max_doublings: None
这些是我在开发服务器上查看的一些日志 - 我没有等到重试间隔稳定下来,不过:
INFO 2015-09-02 12:50:54,670 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:50:54,670 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 0.100 seconds
INFO 2015-09-02 12:50:54,774 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:50:54,774 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 0.200 seconds
INFO 2015-09-02 12:50:54,983 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:50:54,983 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 0.400 seconds
INFO 2015-09-02 12:50:55,394 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:50:55,394 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 0.800 seconds
INFO 2015-09-02 12:50:56,206 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:50:56,206 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 1.600 seconds
INFO 2015-09-02 12:50:57,815 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:50:57,815 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 3.200 seconds
INFO 2015-09-02 12:51:01,058 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:51:01,058 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 6.400 seconds
INFO 2015-09-02 12:51:07,507 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:51:07,507 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 12.800 seconds
INFO 2015-09-02 12:51:20,346 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:51:20,346 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 25.600 seconds
INFO 2015-09-02 12:51:45,988 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:51:45,989 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 51.200 seconds
INFO 2015-09-02 12:52:37,224 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:52:37,225 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 102.400 seconds
INFO 2015-09-02 12:54:19,668 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:54:19,668 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 204.800 seconds
INFO 2015-09-02 12:57:44,508 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:57:44,509 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 409.600 seconds
编辑:实际上我找到了一个更好的答案,我用它来更正我的答案(我之前错过了埋在其他人之间的 0.100 秒日志条目):What are the defaults for a task queue in AppEngine?
Google App Engine 具有强大的参数集,可以自动重试分布式任务队列中失败的任务。而 documentation explains what these parameters do,它没有指定默认参数是什么。
任务队列的重试参数的默认值是多少。更具体地说,以下重试参数的默认值是什么:
task_retry_limit
task_age_limit
min_backoff_seconds
max_backoff_seconds
max_doublings
默认行为在this section的开头描述:
Tasks executing in the task queue can fail for many reasons. If a task fails to execute (by returning any HTTP status code outside of the range 200–299), App Engine retries the task until it succeeds. By default, the system gradually reduces the retry rate to avoid flooding your application with too many requests, but schedules retry attempts to recur at a maximum of once per hour until the task succeeds.
根据此描述并通过观察推送队列中实际失败任务的日志,没有重试配置(因此对所有这些参数使用默认值)我 "derived" 这些值:
- task_retry_limit: None
- task_age_limit: None
- min_backoff_seconds: 0.1
- max_backoff_seconds: 3600
- max_doublings: None
这些是我在开发服务器上查看的一些日志 - 我没有等到重试间隔稳定下来,不过:
INFO 2015-09-02 12:50:54,670 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:50:54,670 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 0.100 seconds
INFO 2015-09-02 12:50:54,774 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:50:54,774 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 0.200 seconds
INFO 2015-09-02 12:50:54,983 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:50:54,983 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 0.400 seconds
INFO 2015-09-02 12:50:55,394 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:50:55,394 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 0.800 seconds
INFO 2015-09-02 12:50:56,206 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:50:56,206 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 1.600 seconds
INFO 2015-09-02 12:50:57,815 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:50:57,815 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 3.200 seconds
INFO 2015-09-02 12:51:01,058 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:51:01,058 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 6.400 seconds
INFO 2015-09-02 12:51:07,507 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:51:07,507 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 12.800 seconds
INFO 2015-09-02 12:51:20,346 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:51:20,346 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 25.600 seconds
INFO 2015-09-02 12:51:45,988 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:51:45,989 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 51.200 seconds
INFO 2015-09-02 12:52:37,224 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:52:37,225 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 102.400 seconds
INFO 2015-09-02 12:54:19,668 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:54:19,668 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 204.800 seconds
INFO 2015-09-02 12:57:44,508 module.py:808] my_module: "POST /my/task_q/path HTTP/1.1" 403 55
WARNING 2015-09-02 12:57:44,509 taskqueue_stub.py:1977] Task task2 failed to execute. This task will retry in 409.600 seconds
编辑:实际上我找到了一个更好的答案,我用它来更正我的答案(我之前错过了埋在其他人之间的 0.100 秒日志条目):What are the defaults for a task queue in AppEngine?