-
Notifications
You must be signed in to change notification settings - Fork 396
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
kill ns loop if it is running more than 10 minutes #1340
Conversation
That run time is weird, as the socket timeouts for the operations made by the script are not long enough to cause such long runtime. Typically the script exits in seconds. Do you have any additional information under which conditions this happens? (Also, the pr was probably intended to target dev?) |
Yes, the pr was made to be for dev, moving it there in a minute. As for your second question, If you are talking about the hang for more than two hours, this happened on "normal" conditions that is pi zero running alone, getting it's internet connection from a phone (using wifi). If you are asking why this sometimes takes 5-6 minutes, than I guess that this is more pi-zero processing time. 2019-12-27 13:11:07 openaps.ns-loop Starting oref0-ns-loop at Fri 27 Dec 2019 01:11:07 PM IST: So, in this case the loop took 7 minutes. |
By the way, looking at the time it takes this loop to run, we might consider changing that to 15-20 minutes. grep Starting ns-loop.log Starting oref0-ns-loop at Thu 26 Dec 2019 02:50:08 PM IST: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also saw the same and made a similar change on one of our rigs.
Today, oaps stopped uploading data to NS, therefor I thought that it stopped working.
A small debug showed that ns-loop stopped running, and specifically, the following process got stuck:
root 14207 14063 0 37727 38252 0 16:23 ? 00:00:25 node /usr/local/bin/oref0-get-ns-entries cgm/ns-glucose-1h-temp.json https://snir-dev.herokuapp.com 911eea185f5c758ac275687da8b7eab50ad720e3 1
It seems that on pi-zero this process might be running up to 6-7 minutes (I saw it once running for 20 minutes), so killing it after 10 minutes seems reasonable.