GithubHelp home page GithubHelp logo

Comments (4)

hajapy avatar hajapy commented on May 22, 2024 1

Perhaps missing a clearInterval(interval) here: https://github.com/machulav/ec2-github-runner/blob/main/src/gh.js#L65

from ec2-github-runner.

hajapy avatar hajapy commented on May 22, 2024 1

Thanks for the fix. In my case I'm fairly confident the instance was able to connect to the internet (I've had many successful runners). I believe the polling rate is too high. At 60 api calls/minute, not accounting for any other api calls, we can only have about 16 minutes of waiting per hour per repo before reaching the rate limit.

I was thinking to drop it to poll every 10s and/or add a no-polling period for the first minute where it is very unlikely the runner will exist yet. This would help avoid unexpected issues for an active repo.

from ec2-github-runner.

machulav avatar machulav commented on May 22, 2024

Perhaps missing a clearInterval(interval)

Good catch! 👍
Thanks!

It did not ever succeed to register, so the limit must have been hit before it could try to register.
Also, it seems likely that the interval used to check whether the runner is created should be increased or made configurable.

Based on my tests, even the smallest and least powerful EC2 instance type t2.nano is created and registered within 3 minutes.

If the runner is not registered in 3 minutes then, then most probably it won't be created because of the issue with the connection to the Internet or, as you said, in limitation of the GitHub API. However, I didn't face such a problem with GitHub API limits before.

That's why I would even reduce the timeout from 10 minutes to 5 minutes to decrease the billable time when the EC2 instance registration is failed.

from ec2-github-runner.

machulav avatar machulav commented on May 22, 2024

@hajapy It's actually a good point! I will try to measure the average time of the self-hosted runner registration and then add a timeout before start pulling every 10 seconds.

from ec2-github-runner.

Related Issues (20)

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.