DEV Community

Discussion on: Chasing down modest database scaling issues when you're not sure what's going on

Collapse
 
rhymes profile image
rhymes • Edited

Glad you caught it!

A simple idea to improve the monitoring could be to create an alarm on logged database metrics.

With Standard tiers Heroku periodically logs a line with the statuts of the DB, in this line you have a key named: sample#active-connections=N where N is the number of opened connections.

I think that with Papertrail (probably also other logging addons) you can set an alert on that string that sends the event every 10 minutes or 1 hour to your preferred destination (like a low key "metrics" channel on Slack).

I think I'm going to try it myself tomorrow :D

Collapse
 
ben profile image
Ben Halpern

Yeah, we use Timber and do this sort of stuff but at the moment we've mostly just configured alerts around relatively known issues. We have the tools but we need to step up and really configure these things to be more useful.