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

Rendering of terminated remote overrides from Loop #5992

Closed
bjornoleh opened this issue Sep 14, 2020 · 15 comments
Closed

Rendering of terminated remote overrides from Loop #5992

bjornoleh opened this issue Sep 14, 2020 · 15 comments

Comments

@bjornoleh
Copy link
Contributor

bjornoleh commented Sep 14, 2020

[With NS 14.0.2,] temporary overrides are still rendered below the BG chart after it has been disabled.

System: Loop (FreeAPS)
NS is hosted with Heroku using mLab (not migrated to Atlas)

The remote overrides and override cancel still works from Careportal

The BG target pill is updated correctly.

Deploying Dev 13.1.0 as of Aug 22, 2020, the temporary override rendering is terminated at the correct time.

14.0.2:
image

13.1.0 Override terminated at red line
image

@bjornoleh
Copy link
Contributor Author

Re-deploying 14.0.2 renders the override correctly.

At a similar occurrence yesterday, restarting all dynos in Heroku also solved the problem. This was after deleting the entry from the "treatments" collection in mLab, which in itself did not remove the rendering of the override.

Given these observations, it is quite likely the issue is be independent of recent developments in Nightscout.

@bjornoleh
Copy link
Contributor Author

bjornoleh commented Sep 14, 2020

Ok, I have confirmed that restarting dynos in Heroku is fixing the temp override display problem. It is probably unrelated to the NS version.

image

I could suspect the mLab database size to be the culprit, but it seems to be well within the limits. Also, the profile collection has been purged recently.

For good measure, I have also done a repairDatabase in mLab. This freed up about 11 Mb of space in the database, which seems quite irrelevant here.

Any hints for how to solve his is welcome, as it can easily be a cause of confusion when communicating with other caregivers at school.

image

image

@sulkaharo
Copy link
Member

Am I correct this is with Loop?

@bjornoleh
Copy link
Contributor Author

@sulkaharo yes, as mentioned in the title :-)

@bjornoleh
Copy link
Contributor Author

Minor update: restarting dynos was required to correctly display terminated temp overrides from Loop also after the mLab repairDatabase.

@bjornoleh
Copy link
Contributor Author

bjornoleh commented Sep 14, 2020

Possibly not-so-minor update:

Deployed Dev 13.1.0 as of Aug 22, 2020
Activated Temporary override from Careportal
Terminated with "Temporary override cancel" from Careportal: --> The override was rendered correctly, without needing restart of dynos

This indicates that recent changes in Dev may be a factor here.

@sulkaharo
Copy link
Member

@bjornoleh I know the cause for this. Can you test the latest DEV, it should fix this for overrides that have been issued up to three hours earlier. The real fix will take longer to implement.

@bjornoleh
Copy link
Contributor Author

@sulkaharo Thanks, it's good to know you have found the cause. I just tested with latest DEV, but unfortunately it doesn't seem to fix it for me. I did a ctrl-f5 reload in Win10-Chrome to be sure the new build was active, this usually does the trick.

To be specific, this is what I deployed (previous deploy was Dev 13.1.0 as of Aug 22):

Compare diff from Heroku "Latest activity":
bjornoleh/cgm-remote-monitor@ed402e9...c839dc3

Terminated after 4 minutes, still displayed as 60 min:
image

After restart all dynos:
image

@sulkaharo
Copy link
Member

Ok new attempt - can you update to the latest dev again. :)

@bjornoleh
Copy link
Contributor Author

It seems like that did the trick, I have tested it twice, so I'm pretty sure :-) Thank you!

I suppose overrides that were running for more than three hours will still be rendered after termination?

@sulkaharo
Copy link
Member

Great to hear! I bumped the treatment delta sync to four hours now; anything older than that will still exhibit the glitch until we have the "real" fix.

@sulkaharo
Copy link
Member

#6056 should fix this for good - if you want to help test, you'll need to deploy branch cache_invalidation to your Heroku setup

@bjornoleh
Copy link
Contributor Author

@sulkaharo
I tested activating and terminating a remote override after deploying the cache_invalidation branch. This worked as expected, and the terminated override was rendered correctly. This was just a short lasting one though, I have not tried anything else.

@bjornoleh
Copy link
Contributor Author

Still working in the testing branch as of today, but only tested in the short term.

@bjornoleh
Copy link
Contributor Author

Working also for long term overrides after this fix:

#6056

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