Closed alpersid closed 3 years ago
@alpersid the max_retries
is not available in FlexibleEngine provider.
How many resources were managed in your module?
Hello,
In the mentioned module I have 32 resources. Seems that using parallelism=1 makes it work after ~2 retries, but it's taking a lot of time.
Best regards, Alex
@alpersid can you show the debug log? we can get the specified API which has exceeded the limitation on the cloud side.
Hello,
Here you can find the full debug log:
2021-05-04T13:36:56.592Z [TRACE] vertex "module.autoscaling_karma.flexibleengine_ces_alarmrule.elb_alarm_rule_": dynamic subgraph encountered errors: alarmrule: Too many requests have been sent in a given amount of time. Pause requests, wait up to one minute, and try
again.,alarmrule: Too many requests have been sent in a given amount of time. Pause requests, wait up to one minute, and try again.,alarmrule: Too many requests have been sent in a given amount of time. Pause requests, wait up to one minute, and try again.,alarmrule
: Too many requests have been sent in a given amount of time. Pause requests, wait up to one minute, and try again.
2021-05-04T13:36:56.592Z [TRACE] vertex "module.autoscaling_karma.flexibleengine_ces_alarmrule.elb_alarm_rule_": visit complete
2021-05-04T13:36:56.592Z [TRACE] vertex "module.autoscaling_karma.flexibleengine_ces_alarmrule.elb_alarm_rule_ (expand)": dynamic subgraph encountered errors: alarmrule: Too many requests have been sent in a given amount of time. Pause requests, wait up to one minute
, and try again.,alarmrule: Too many requests have been sent in a given amount of time. Pause requests, wait up to one minute, and try again.,alarmrule: Too many requests have been sent in a given amount of time. Pause requests, wait up to one minute, and try again.,
alarmrule: Too many requests have been sent in a given amount of time. Pause requests, wait up to one minute, and try again.
Thank you in advance, Alex
Hi, Alex
After analyzing the debug log, it is confirmed that the issue is caused by the API flow control, and the corresponding API is Querying an Alarm Rule.
@antonin-a @qukuijin Maybe we need your help to expand the throttling threshold of specified API.
Hello @alpersid it seems to be caused by an API rate limit on platform side. The best solution for such cases is to open a ticket on Cloud Provider side (Flexible Engine Service Desk). Can you please send them the URL of this issue with a short description ? (@ShiChangkuo @qukuijin1989 )
Meanwhile I will check with Ops side to see if they observed api limitation
we will raise the limitation
Thanks guys for your quick reaction! I really appreciate all your hard work :)
HI @alpersid please have a try
Hi there,
During terraform refresh/apply I receive the error HTTP 429 - too many requests.
From what I've found, the issue is on the API side and it can be solved by using parallelism=n.
I've tried with all types of parallelism, from 4 to 1 and still got the same issue.
From what I see from the output, the alarm rules are refreshed successfully, but when refreshing the as_policy, which is linked with an alarm, the error appears
Terraform Version
15
FYI On openstack I see that there's a parameter for the openstack provider "max_retries", which can help with the error, but it's not currently
implemented
for provider flexibleenginemax_retries - (Optional) If set to a value greater than 0, the OpenStack client will retry failed HTTP connections and Too Many Requests (429 code) HTTP responses with a Retry-After header within the specified value.
Test:
Thank you in advance, Alex