Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Self hosted runners for GitHub actions fail very often on #14337

Closed
potiuk opened this issue Feb 20, 2021 · 5 comments
Closed

Self hosted runners for GitHub actions fail very often on #14337

potiuk opened this issue Feb 20, 2021 · 5 comments
Assignees
Labels
kind:bug This is a clearly a bug

Comments

@potiuk
Copy link
Member

potiuk commented Feb 20, 2021

Very often, the self-hosted runners fail with this message:

The self-hosted runner: Airflow Runner 32 lost communication with the server. 
Verify the machine is running and has a healthy network connection. 
Anything in your workflow that terminates the runner process, starves it for CPU/Memory, 
or blocks its network access can cause this error. | 

Example failure: https://github.com/apache/airflow/actions/runs/584691417

It happened basically every time (and in many cases more than once) over the last few pushes I've done.

I think we need to get to the root cause of it - I suspect this might have something to do with scaling in/out the runners.

Happy to help solving it - I just need to have access to logs @ashb :).

@potiuk potiuk added the kind:bug This is a clearly a bug label Feb 20, 2021
@ashb
Copy link
Member

ashb commented Feb 20, 2021

I have been working on this slowly - my hypothesis is it's a race condition: when the runner is busy it is protected from scale in, it finishes, gets un-protected from scale in, AWS starts terminating it, but before the instance terminates it picks up a new job. Right in time to get hard killed.

My in progress fix is to use a lifecycle hook to not get killed instantly.

@ashb ashb self-assigned this Feb 20, 2021
@ashb
Copy link
Member

ashb commented Feb 20, 2021

A quick fix for now is to disable the scale in alarm on the ASG

@potiuk
Copy link
Member Author

potiuk commented Feb 20, 2021

Sounds palausible

@ashb
Copy link
Member

ashb commented Feb 20, 2021

Have just pushed out that change it should take effect soon (some old runners are still up)

@potiuk
Copy link
Member Author

potiuk commented Feb 21, 2021

It works much better now! Thanks ! Closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug This is a clearly a bug
Projects
None yet
Development

No branches or pull requests

2 participants