CGM in the Cloud http://rickgaribay.net/category/71.aspx CGM in the Cloud en-US Rick G. Garibay rickgaribay@hotmail.com Subtext Version 1.9.5.176 Restarting Heroku Dynos for NightScout (or other Adventures) http://rickgaribay.net/archive/2015/10/25/restarting-heroku-dynos-for-nightscout-or-other-adventures.aspx <p>The great folks at Nightscout recently published an update to members/subscribers regarding <a href="https://github.com/nightscout/cgm-remote-monitor/issues/657" target="_blank">another breaking Mongolabs change</a>. <a href="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/Restarting-Your-Heroku_8262/image_10.png"><img title="image" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; float: right; padding-top: 0px; padding-left: 0px; border-left: 0px; display: inline; padding-right: 0px" border="0" alt="image" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/Restarting-Your-Heroku_8262/image_thumb_4.png" width="240" align="right" height="212" /></a></p> <p>In a nutshell, recently, Mongolabs updated their MongoDb database to 3.0.7 which appears to be breaking Nightscout and other clients. My guess is that the fix recommended below ensures any pooled and or unauthenticated connections are released, but I haven’t dug deeper to verify.</p> <p><strong><font color="#ff0000">If you host your Nightscout Website or Bridge on Heroku, keep reading. My intent in this post is to provide a simple way to restart your app without a lot of technical experience required.</font></strong></p> <p>If you are hosting the <a href="https://github.com/nightscout/cgm-remote-monitor" target="_blank">Nightscout Website</a> or <a href="https://github.com/bewest/share2nightscout-bridge/wiki" target="_blank">Nightscout Bridge</a> on Heroku, you may stumble to figure out how to ‘restart’ the apps, called “Dynamos” (Step 2 on the right). On Microsoft Azure, it’s very simple to restart an Azure Website but Heroku is a bit more subtle.</p> <p>A few Google searches reveals the <font face="Consolas">heroku restart</font> command line command, but I doubt most  NightScout users are going to take the time to download client SDKs, set up Procfiles, etc. and there does not appear to be any documented way to restart a Dyno from the UI/Dashboard.</p> <p>Poking around a bit, I found the solution is simple:</p> <p>1. Click on your Dyno (i.e. this will be the app that is either running your Website or Bridge) to bring up the setting page.</p> <p>2. On the settings page, Click Edit:</p> <p><a href="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/Restarting-Your-Heroku_8262/image_4.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/Restarting-Your-Heroku_8262/image_thumb_1.png" width="640" height="288" /></a></p> <p>3. Once in “Edit” mode, you can switch your Dyano off</p> <p><a href="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/Restarting-Your-Heroku_8262/image_6.png"><img title="image" style="border-left-width: 0px; border-right-width: 0px; background-image: none; border-bottom-width: 0px; padding-top: 0px; padding-left: 0px; display: inline; padding-right: 0px; border-top-width: 0px" border="0" alt="image" src="http://rickgaribay.net/images/rickgaribay_net/Windows-Live-Writer/Restarting-Your-Heroku_8262/image_thumb_2.png" width="640" height="394" /></a></p> <p>4. Be sure to hit Save. </p> <p>5. Repeat Steps 2 and 3, turn the Dyno back on and hit Save.</p> <p>Note, I did not have to wait 10 minutes for the fix to take effect. You should be able to refresh your website and it should work.</p> <p>Hope this helps anyone needing to “restart” a Dyno. If it doesn’t work for you, please drop me an email or hit me up on twitter: @rickggaribay</p><img src="http://rickgaribay.net/aggbug/377.aspx" width="1" height="1" /> Rick G. Garibay http://rickgaribay.net/archive/2015/10/25/restarting-heroku-dynos-for-nightscout-or-other-adventures.aspx Sun, 25 Oct 2015 17:20:11 GMT http://rickgaribay.net/archive/2015/10/25/restarting-heroku-dynos-for-nightscout-or-other-adventures.aspx#feedback http://rickgaribay.net/comments/commentRss/377.aspx http://rickgaribay.net/services/trackbacks/377.aspx