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

Closing within and hour usually #3

Open
djsnipa1 opened this issue Mar 17, 2022 · 4 comments
Open

Closing within and hour usually #3

djsnipa1 opened this issue Mar 17, 2022 · 4 comments

Comments

@djsnipa1
Copy link

Thank you for this repo! It is cool and useful.

Can you tell me why my connections keep closing way before the 6 hour run time. I just had one close at 39min and each time I lose some progress obviously. If there is a way to prevent this, I would really like to know.

Thank you for your time.

@jstrieb
Copy link
Owner

jstrieb commented Mar 17, 2022

Hey @djsnipa1, thanks for opening this issue! I've noticed this too - it's only started fairly recently, and is definitely extremely annoying.

In my case, the actions are failing with exit code 143. Briefly searching that exit status code had not illuminated much. I suspect GitHub may be doing some sort of pkill sleep at a slightly randomized interval after an action has been running for more than 30 minutes. I tried breaking the sleep part of the action into separate, shorter sleep commands in case GitHub was killing long-running steps, but that didn't fix the issue.

At some point I'll try replacing the sleep 6h command with the following to see if it helps, but I'm taking shots in the dark at this point.

python -c "import time; time.sleep(60 * 60 * 6)"

If you figure out what's going wrong, I'd appreciate knowing! I'll happily merge a pull request you make if you fix it, and will be sure to credit you in the README.

@jstrieb
Copy link
Owner

jstrieb commented Mar 18, 2022

Tried the above as a test in another repo, and it didn't work. After about an hour, the test failed as it has been doing.

It is possible this is a new security feature put in place by GitHub to prevent abuse of Actions for cryptomining (related to this blog post).

@djsnipa1
Copy link
Author

Thank you for your responses! I was thinking the latter also. I've noticed sometimes it gets killed right after I transfer a couple hundred megabyte file, for example. I haven't been documenting my exit codes (I could go back and check the logs) but I'm sure they are the same as you've been experiencing. I'll continue to use this for things I can do in under 30 min. If I find out anything I will definitely let you know.

Also, if you happen to come across or develop anything with a similar use case, would you mind sharing it here? I don't even really know where to look for something similar. I don't even remember how I came across your repo but I was glad I did!

Thanks again for your time and hard work!

@jstrieb
Copy link
Owner

jstrieb commented Dec 31, 2022

I've done some investigating, and it seems that GitHub blocks jobs that are connected to ngrok for more than around 45 minutes to an hour. I haven't extensively tested this, except to confirm that I can connect over Tor for more than an hour when the steps to install and run ngrok are disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants