sudomesh / monitor

a way to monitor health of (people's open) network
GNU General Public License v3.0
5 stars 7 forks source link

heroku mlab db not getting configured properly #36

Closed bennlich closed 5 years ago

bennlich commented 5 years ago

The mlab console (available from heroku -> peoplesopen-monitor -> resources -> add ons -> mlab) reports that the routeLog collection is not capped and has no index. This means tools/setup-db.js is not successfully configuring the db when deploying to heroku. (It does succeed locally.)

This line is supposed to run the setup script when the heroku app is deployed, but it isn't working: https://github.com/sudomesh/monitor/blob/3a90f357c506013a961108ac84222b6cd7804bae/Procfile#L1

I think one result of this misconfiguration is that we're seeing an error in the logs on every new write to the DB:

2018-10-27T18:27:01.611815+00:00 app[web.1]: (node:20) UnhandledPromiseRejectionWarning: MongoError: quota exceeded

I think this means we've hit the quota for the free mlab instance. Weirdly the write still seems to succeed? The monitor continues to show up-to-date data.

Have to run now but will investigate later...

bennlich commented 5 years ago

This is fixed now. It did result in some missing data when we hit the free mlab cap for a period of time:

screenshot from 2018-10-27 17-34-03

:)