porkbun 503 rate limiting#911
Conversation
|
|
||
| for _, record := range records { | ||
| err = p.updateRecord(ctx, client, recordType, p.owner, ipStr, record.ID) | ||
| time.Sleep(time.Second) |
There was a problem hiding this comment.
I ran into this too.
One thing, is that if we're getting rate-limited, likely adding the same sleep delay here won't solely fix the underlying issue. This fixes it for lots of subdomains under the same hostname, but if you have DDNS-updater setup to do lots of different hostnames, you can also run into rate-limiting (as I have encountered).
@qdm12 any thoughts on how you'd want this fixed? Maybe wrap the HTTP client to have a general http request rate limit, either per host, or globally. Would that make sense to you? In my mind, you'd ideally be able to specify a max requests per period for a given provider or globally, and the http client would automatically handle queuing and staying within that request limit.
There was a problem hiding this comment.
This also might be pretty unique to porkbun and we'd just want to setup a porkbun ratelimiter, though I could see it being an issue for any DNS provider during the update step.
|
@likeaninja5 @bentemple are you sure this is rate limiting? ddns-updater/internal/update/service.go Lines 180 to 187 in 02a0ddd We could alternatively have an http client for porkbun that sleeps 1 second after each request. |
|
If you turn on debug log level, do you get any of these in the response http headers: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset |
When updating multiple domains after an ip change porkbun seems to have an issue with too many requests in a short period of time. I don't have much more info than that, since porkbun is returning a 5XX. Usually ddns-updater will only get 1 or 2 domains updated before erroring out on the rest.
I don't actually know go, so apologizes if something isn't following standards here.
Before change.
After change: