Improvements & Bugfixes

09 May 2019

Since the new year we've released a bunch of new features and plans. The total number of Downtime Monkey users has increased by over 50% and the number of websites being monitored has more than doubled.

So we've taken the last few weeks to relax, kick-back and take it easy catch up with some maintenance.

We've reduced memory use of clean-up scripts, automated the addition of free SMS credits upon sign-up and applied a bugfix to our Slack App.

Read on to see the details...

hard hats for work

Automation of Free SMS Credits On Sign-up

All Pro Plans that are purchased yearly come with free SMS credits (e.g. Pro1000 users get 200 free credits and Pro1 users get 5 free credits).

In the spirit of moving fast we sometimes do things that don't scale... and applying free credits was a case in point.

In order to ship our payment system quickly we used to add free SMS credits to a customer's account manually.

We would get notified of a new sign-up and within a few minutes we could add the credits to the account.

However, as things are now scaling-up it makes sense to automate this kind of thing... so we did. People now receive their free SMS credits instantly upon sign-up.

Improvements to Clean-Up Scripts

Downtime Monkey records the response times of monitors every minute. This means that we add a lot of rows to the database - 1440 rows per website per day to be precise!

To stop the database growing to the size of a small galaxy we regularly need to delete the old response times from the database.

This is done by a clean-up script which automatically runs once a day.

However, a few weeks ago the amount of data to delete became too much which meant the script hit its memory limit and stopped running. This wasn't a major problem (memory limits are in place for a reason) and Downtime Monkey continued to function just fine. However, it meant that the database grew to a gazillion rows in a few days.

This was easily fixed - we manually deleted the old response times and re-wrote the clean-up script to be much more efficient with memory.

Slack App Bugfix

One of our new(ish) features is the ability to receive downtime alerts in Slack.

To make the user experience as easy as possible we developed our Slack App so that everything can be managed in Downtime Monkey. You can connect to your Slack account, manage your alert settings and disconnect from your Slack... all on the Downtime Monkey website.

We missed something though: the possibility that someone might delete the Downtime Monkey Slack App directly in Slack while leaving alerts turned on in Downtime Monkey.

Needless to say, this did happen...

The result was that when the user's website went down the Slack alert was prepared as usual but failed to send. No problem so far...

However, the alert remained in a queue and repeat attempts to send it were made every minute.

This wasn't ideal. Lots of errors were logged and the server was loaded unnecessarily.

So we fixed it - now if a Slack alert fails for this reason the alert is deleted from the queue and Slack alerts are turned off for the user.