Closed lachie83 closed 5 years ago
Thanks a lot for reporting this @lachie83, much appreciated!
A quick look at the responsible code segment suggests that I'm overloading the API server with requests, hence the HTTP 429 response code and due to that, rather than sending JSON back the API server sends some error message in plain-text that the library tries to decode because it thinks it's actually JSON.
This is not super surprising since I don't have any rate limiting in the code creation part. My hunch (or working hypothesis, if you prefer): adding some short, random delays in the ms
range after go pr.launch()
should address this issue.
This sounds like a reasonable approach. Just out of interest would it be better to make the go routine handle a 429 from api server?
Yeah, handling 429 from API server, in addition, wouldn't hurt. Nevertheless, not hammering the API server like a berserker would prolly not be a bad thing to do, in the first place ;)
Or, even better, three scale testing strategies: berserker
(the current implementation), good-citizen
(rate limiting), and graceful
(handling 429
s). WDYT?
I agree but it's probably quickest to implement the good-citizen
based on your original proposal and ship it.
@lachie83 are you working on this? We also see this issue in our test setup (and would like to fix it).
Thanks for the reminder, will try to put a fix together for this over the weekend
@johscheuer given your overall contributions, I mean, if you wanna fix that as well … :)
I can take a look next week :)
OK, super @johscheuer … let's see who's faster, LOL ;)
I'm occasionally getting spurious json decode errors when trying to run larger numbers of pods.