Hey everyone 👋
A few days ago Bootstrap 5 Alpha was officially launched and since we build themes using Bootstrap and we also have a blog we thought it would be a good idea to quickly set up an article and distribute it on our social media, reddit and so on.
After about 1-2 hours of writing the article it was ready. I also created a custom preview image to make it more shareable on social media. Here's the article if you're curious:
Article about Bootstrap 5 Alpha launch.
I started to share it on our social media, relevant subreddits, designersnews, hackernews and so on. Little did I know what would happen. With my co-founder, Robert, we even started joking around that it might crash our server lol.
So after sharing it on these multiple platforms the Google Analyics live users was like this: 20, then 50, then 70, then 100, then 130 and so on. I went outside for a couple of minutes and when I got back my colleague told me that he can no longer access Themesberg.
I was like... what? This never happened before. So I took a look and indeed, it was not working. Like at all. Anywhere. Started panicking a little since this was a crucial time especially because of the many visitors.
I took a look on our server logs and hundreds of 500 server errors were popping up. The queries no longer worked. The culprit was a stupid query that counted all of our users for every page accessed. I quickly hardcoded the count and later on optimized the whole thing.
The damage?
Around 700 lost visitors in the 10 minutes while the website was down.
Lesson learned?
Optimize your queries. Update your hosting. We were on the cheapest plan on Heroku.
We also switched to Cloudflare for DDoS protection because this was a period of security paranoia LOL.
Keep building awesome stuff people,
Zoltan, CEO @ Themesberg
Top comments (0)