Open quinncomendant opened 7 years ago
In the meantime, I've hacked up an ungraceful line of bash to pause denominator every so many requests to prevent overrunning the API limits. Maybe useful for others with the same problem (caveat: it will pause all processes matching pidof java
). It works by watching the output file, and every 3 zones that are saved, it will pause for 4 seconds (so at most 45 zones/minute are retrieved). UPDATE: a 25 second sleep was too slow and the API would timeout; lowered to 4 second sleep every 3 domains.
denominator zone list >| allzones.txt & sleep 2; DPID=$(pidof java); echo "I will pause PID '$DPID' for 4 sec every 3 zones"; while sudo kill -0 $DPID 2>/dev/null; do if [[ $(($(wc -l < allzones.txt) % 3)) -eq 0 ]]; then sudo kill -STOP $DPID; sleep 2; sudo kill -CONT $DPID; fi; done
Obviously, it'd still be great to have this functionality built-in to denominator.
I packaged the previous hack into a script (requires customizing before running). https://gist.github.com/quinncomendant/c65cf0c768812c8cc429876603f5c5c7
Rackspace Cloud DNS, like all providers, imposes limits on the frequency of API requests. E.g., 60/minute for
GET /domains
. I'm hitting this limit when runningdenominator zone list
:Because denominator cannot handle this API limit, there is no way for me to list all zones. 😨
I would expect denominator to pause occasionally to avoid the
OverLimit Retry
error.