ivalkou / LoopWorkspace

Loop fork with Microboluses and Nightscout CGM
67 stars 64 forks source link

Excessive profile sync to Nightscout #6

Open sulkaharo opened 4 years ago

sulkaharo commented 4 years ago

Hi! I got reports from some FreeAPS users that they're having issues with Nightscout profiles. Checking their profile data, I noticed they have a huge amount of profile data in their system, where in some cases the profile has been synched in three times within one second, resulting in the profile collection bloating to be huge. I doubt the profile actually changes this often, so I wonder where the glitch is that causes this. One suspicious part of thee data was that the loopSettings section seems to have "scheduleOverride" section, which seems to be part of the runtime data and not part of the profile, where if the next scheduled basal change is sometimes entered into the profile data and sync is caused by a difference in the profile, this would trigger the profile sync to happen excessively.

rehtori commented 4 years ago

I had this problem too. Setup I use has Loop (FREEAPS), spike, blucon nightrider, libre1, nightscout.

Noticed this problem as spike stopped showing new treatments, but those were visible in NS chart. Then noticed that NS profiles were causing NS reports to not load.

The fix was to remove the profiles collection from the Mongo and let NS re create it by making profile change from loop settings.

rehtori commented 4 years ago

Checked amount of profiles now after using the newest (172) freeaps version for 12 hours. There is 6 documents in profiles.

Edit: Checked again and now there is 39 documents after 6 days.