Code Monkey home page Code Monkey logo

Comments (10)

mhausenblas avatar mhausenblas commented on June 6, 2024 1

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.

from kboom.

mhausenblas avatar mhausenblas commented on June 6, 2024 1

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 ;)

from kboom.

mhausenblas avatar mhausenblas commented on June 6, 2024 1

Or, even better, three scale testing strategies: berserker (the current implementation), good-citizen (rate limiting), and graceful (handling 429s). WDYT?

from kboom.

lachie83 avatar lachie83 commented on June 6, 2024 1

I agree but it's probably quickest to implement the good-citizen based on your original proposal and ship it.

from kboom.

johscheuer avatar johscheuer commented on June 6, 2024 1

@lachie83 are you working on this? We also see this issue in our test setup (and would like to fix it).

from kboom.

johscheuer avatar johscheuer commented on June 6, 2024 1

I can take a look next week :)

from kboom.

lachie83 avatar lachie83 commented on June 6, 2024

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?

from kboom.

mhausenblas avatar mhausenblas commented on June 6, 2024

Thanks for the reminder, will try to put a fix together for this over the weekend

from kboom.

mhausenblas avatar mhausenblas commented on June 6, 2024

@johscheuer given your overall contributions, I mean, if you wanna fix that as well … :)

from kboom.

mhausenblas avatar mhausenblas commented on June 6, 2024

OK, super @johscheuer … let's see who's faster, LOL ;)

from kboom.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.