Closed louh closed 10 years ago
I'm looking into this. I might have to run the script a couple of times manually which might generate reports. I'll report back with what I find.
Here's the issue:
On the old streetmix backend app (streetmix-api-v2
), the value of the MONGOHQ_URL
is something like this:
$ env | grep MONGO
MONGOHQ_URL=mongodb://XXXXXX:XXXXXXX@XXXX.mongoZZ.com:XXX/XXXXXXXX
In particular note the hostname and port combination. There is only one: XXXX.mongoZZ.com:XXX
.
On the new streetmix combined app (streetmix-v2
), the value of the MONGOHQ_URL
is something like this:
$ env | grep MONGO
MONGOHQ_URL=mongodb://XXXXXX:XXXXXXX@XXXX.mongoZZ.com:XXX,YYYY.mongoZZ.com:YYY/XXXXXXXX
In particular note the hostname and port combinations. There are two: XXXX.mongoZZ.com:XXX
and YYYY.mongoZZ.com:YYY
.
The latter is valid syntax for MongoDB Connection String URIs. Consequently what needs to be fixed here is the code on this line to parse out a host and port combination correctly. Fix incoming.
@louh The fix is in but I need someone with sufficient Heroku privileges to redeploy the Streetmix app.
I take that back. I have privileges to push to Heroku; my SSH key just needed to be updated.
I've pushed the app now and manually run the bin/email_heroku_db_stats.sh
script. As you'll see in your emails, non-zero stats are back!
Awesome. Thanks much @ycombinator :smile_cat:
Further note: I've now removed the scheduled job from streetmix-api-v2
.
Background: With the recent back-in repository merge back into the main repository, we're having to recreate some of the functionality of the back-end Heroku app on the main Heroku app. This includes the shell script that is run daily by Heroku Scheduler to report database usage statistics.
Currently both apps are running. The
streetmix-api-v2
app has been reporting the same data since September 5, as expected. I have set up the Scheduler onstreetmix-v2
(combined) app yesterday to execute the same script, but today the observed result is that an e-mail was sent to the Streetmix e-mail list containing:None of the data should be actually 0, obviously.
Here are the logs from Papertrail (only the lines related to scheduler):
It seems the Mongo connection is dropping. I'm not a shell script expert. How to fix this?
cc @drewda @ycombinator