看日志,它们描述得很好!
Retry-After返回值0,其中期望的毫秒数。我现在又回到了指数后退,在这种情况下,这是很不理想的。文档和最佳实践指导在没有返回Retry-After标头时回退exp. backoff,但事实确实如此。在重试5次(我的重试策略)之后,我抛出了异常,这表明Microsoft Graph实际上希望我等待3分钟。有人能确认这是一个错误,还是我做错了什么?
<标题>日志:[Information] [RETRY] Date: Thu, 28 Oct 2021 11:55:37 GMTCache-Control: no-cacheTransfer-Encoding: chunkedRetry-After: 0Strict-Transport-Security: max-age=31536000request-id: 19c11610-2b14-4c82-abdd-ce9582eb1fe7client-request-id: 19c11610-2b14-4c82-abdd-ce9582eb1fe7x-ms-ags-diagnostic:{"ServerInfo"{"DataCenter"西方Europe","Slice":"E","Ring":"5","ScaleUnit":"004","RoleInstance":"AM2PEPF000050C2"}}2018-10-28 t11:55:38 .492 [Information] [RETRY] StatusCode: 429, ReasonPhrase: 'Too Many Requests', Version: 1.1, Content: System.Net.Http。HttpConnectionResponseContent, Headers:{Date: Thu, 28 Oct 2021 11:55:37 gmcache - control: no-cacheTransfer-Encoding: chunkedRetry-After: 0strict - transfer - security: max-age=31536000request-id: 19c11610-2b14-4c82-abdd-ce9582eb1fe7client-request-id: 19c11610-2b14-4c82-abdd-ce9582eb1fe7x-ms-ags-diagnostic: {"ServerInfo"; {"DataCenter";;;西欧";;Slice";;;E";;;Ring";;5";ScaleUnit";;;004";;RoleInstance"; "AM2PEPF000050C2"}}Content-Type: application/json}
[Information] [RETRY] RETRY - after重试策略。
[信息]0
[Information] [RETRY] Using RETRY - after header for delay: 00:00:00
[警告][重试]延迟0毫秒,然后重试5.
[错误][2219ab8a36038d2e] [3DDEDC39FE1ABC9D6C328F98503B08FB3FBEB35A223A91D424]响应状态码不指示成功:429 (Too Many Requests).
[警告]429:请求太多。延迟后重试。
2018-10-28 t11:55:38 .524[错误]Operation: Update;异常:[状态码:429;原因:资源' odata_getsubscription__usermailbox_0003bffd -18fb-b0eb-0000- 00000000_00000000_00000000_00000000000 -00000000000 -000000000000'已达到上限'250'。请在'10/28/2021 11:58:13 AM'后重试)
标题>自今日起自行解决。
2021-11-11T15:08:11.101 [Information] [RETRY] StatusCode: 429, ReasonPhrase: 'Too Many Requests', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:{Retry-After: 1}Content-Type: application/json}
2021-11-11T15:08:11.101 [Information] [RETRY] Using Retry-After header for delay: 00:00:00.0010000