Skip to content

mLab discontinuation FAQ

Sulka Haro edited this page Jul 12, 2020 · 16 revisions

If you have Nightscout installed, you’re affected and need to read this regardless of whether you’re using Azure, Heroku or some other service.

mLab discontinuation

You might have noticed there’s talk about mLab being discontinued or gotten an email about this from Heroku. What does this mean? To make it easier for you to understand what’s going on, here’s a mini primer on how Nightscout works.

Nightscout is a web application developed using various technologies, mostly based on Node.js and other Javascript frameworks that run on a server or a web browser. The system comprises of four primary components:

  1. Nightscout Server application that is installed and run on Heroku, Azure on some other similar service
  2. Web based client application that runs on a web browser - this is the Nightscout graph you’ve seen in Chrome, Safari, Explorer or other browsers on your computer or phone. This part of the app is packaged into the server and is thus installed as part of the server.
  3. MongoDB Database, which is used to store all the Nightscout data such as blood glucose values and carb treatments.
  4. Uploader Application, an app made by another developer, used to send blood glucose data to the Nightscout Server. This is the app that talks to your CGM or pump and includes apps like xDrip and the 600-series Uploader app, both of which run on an Android phone.

The server application part implements something called a REST API, which is the technical term meaning a specific way the application can send and receive data. The Uploader Application sends the glucose data to the Server using the REST API, which in turn causes the Server to contact the MongoDB Database and tell it to persist the data into the database. So, as such, the Nightscout Server you’ve installed into Heroku or Azure has no “memory” of the glucose data at all - it’s all stored in MongoDB.

(You might also have additional applications as part of your way of using Nightscout, such as a smart watch app that shows the glucose data. These additional apps use the REST API to request the glucose data from the Nightscout Server. When the app contacts the server to ask for new glucose data to show, the server asks MongoDB for the latest data available, and forwards this to the app.)

Now, when installing Nightscout, you might remember there were several steps to the installation. One of the things you did was installing the Nightscout Server to Azure or Heroku. Another step for people using Azure was creating an account at a service called mLab, to gain access to MongoDB as a service. For those on Heroku, the mLab step was done automatically and you might not even know this step was done for you.

So what does this mean in practice?

Nightscout needs the MongoDB database to work. For those of us who’ve followed the installation instructions provided by the Nightscout support team, you’re using MongoDB service from a company called mLab. mLab was acquired by a company called MongoDB (the original makers of the database) and the old mLab service is in process of being shut down on September 1, 2020. If you want to continue using Nightscout after this date, you have to change over to some new alternative service to get access to MongoDB.

So what do I need to do?

If you’re technically savvy, you have plenty of options such as self-hosting the MongoDB server. This is likely not viable for most of us. Fortunately, MongoDB now offers a free service in Atlas, similar to the free tier mLab offered.

Migrating to Atlas for Heroku users

  1. If it’s been more than a year since you last updated your Nightscout installation, it’s highly likely you have to update your Nightscout installation for it to work with the new Atlas service. Basically, MongoDB has seen significant development over the years and if you have an old installation, you probably have an old incompatible version of the software the Nightscout Server uses to communicate with MongoDB. The instructions on how to update your site are here: http://www.nightscout.info/wiki/welcome/how-to-update-to-latest-cgm-remote-monitor-aka-cookie
  2. After updating your site, you need to migrate your MongoDB service from mLab to MongoDB Atlas. Heroku and MongoDB have authored detailed instructions on how to migrate over to the new free Atlas service: https://docs.mlab.com/how-to-migrate-sandbox-heroku-addons-to-atlas/

Migrating to Atlas for Azure users

Sadly this is a bit more complicated. What’s happened is, it appears some combination of changes in Azure and the Nightscout software have caused the free Azure hosting tier to run out of resources when a new Nightscout version is installed to Azure. We’re in process of looking at authoring better instructions for you, but for now if you want to act on this immediately:

  1. Migrate from Azure to Heroku: https://bfaloona.github.io/loopdocs/nightscout/azure_migration/
  2. After installing your site in Heroku, migrate your MongoDB service from mLab to MongoDB Atlas. Heroku and MongoDB have authored detailed instructions on how to migrate over to the new free Atlas service: https://docs.mlab.com/how-to-migrate-sandbox-heroku-addons-to-atlas/

FAQ

This sucks, right?

Yes.

Can’t Nightscout do without MongoDB / can’t you just run that inside the Nightscout Server?

Sadly not - Nightscout is built around MongoDB and running it in the easy to use hosting services is not possible as of now.

When did I have to act on this, again?

mLab will be shut down on September 1, 2020. If you have not migrated by that date, your Nightscout installation will stop working.

Where can I get help?

Check the CGM In The Cloud group in Facebook. There are multiple threads on the subject - please don’t start a new thread before reading through the existing threads. https://www.facebook.com/groups/cgminthecloud

We also have a Discord channel here: https://discord.gg/rTKhrqz

I have something to contribute to these docs!

Great, tell us about it in Discord: https://discord.gg/rTKhrqz