On Side Projects and Crashing Serversimage
All Stories

On Side Projects and Crashing Servers

Last month, I built a Discord bot for the Colin & Samir server that allows creators to mock up their YouTube titles and thumbnails. It's called Thumbnailed and if you want to check it out or add it to your own server, click here.

😅 But also...maybe don't?

Cause the bot has gotten so much use that it actually crashes once a day. I wake up to one of these emails every morning:

Hello! Your ��thumbnailed” application hosted on Fly.io crashed because it ran out of memory. Adding more RAM to your application might help!

You should know that adding RAM does cost money. Not much, but some. Figure about $5/mo per extra GB. Our docs have complete pricing details.

Now, if you're a technical person reading this, you should know that I have setup a super strict caching strategy for the bot (cache nothing) and have sweepers that run every 15 minutes to clear away all messages and users.

So, there's not much more I know/can/care to do from a technical perspective to bring that memory load down. If you want to peruse the code and make a PR, be my guest.

And suffice to say, since this is a hobby project that I don't charge for, I'm not going to upgrade the RAM on the servers. So, as it stands, I'm just going to continue getting these emails from Fly for the life of the project.

But, here's the weird thing about me...

🥰 I like getting these emails.

Usually, a crashing server is interpreted as a sign of failure. In the moment, we think about all of our possible shortcomings. Did we not scale our infrastructure correctly? Did we ship a bug? Did we not write enough tests?

The thing is, the answer to all of those is usually yes - regardless of if the server crashed. What the server crashing actually means is that someone used our code. Which, in most cases, isn't a sign of failure, but a sign of success.

More often than not, when I ship new projects, they're dead on arrival. No one wants to use them. No one will ever use them. And therefore, they are literally useless.

So, when I get an email saying our server crashed, I get a dopamine rush. Because it means people I care about are using the code I wrote for them. It means people are getting value from my work.

And in that way, it's an amazing problem to have. For side projects, hobby apps, and free services like this, to me crashing servers is a gift. Plus, if you've built something valuable that people care about and it's free...

👍 Your users will forgive you.

I've set up our bot to run across two instances so that when one crashes, the other is hopefully up. So, most of our users have never experienced downtime. However, there are occasions where they have...and nothing bad happened.

People just try again, and by that time Fly has restarted the container and all is right with the world. We have gotten 0 messages complaining about the bot being down since we launched, and we've gotten a dozen messages of people saying how grateful they are for it.



By the numbers, Thumbnailed has generated ~200 images for creators and has been installed on 3 additional servers. The server has crashed 22 times.

Until next time.

Drew Lyton
Drew Lyton
Monday, July 17, 2023

I'm a software engineer, ex-founder and writer who cares deeply about creating a better relationship between technology and society. I'm currently writing a book about early stage entrepreneurship.


If this article has been valuable and you'd like to be notified the next time I post, subscribe to my newsletter!

Each week, I share my latest post along with three other works from people smarter than me on whatever topic is top of mind. Of course, you can unsubscribe at anytime.