FYI: AWS t2.micro instance is too small. Use t2.small at least

AI-generated summary

In a discussion about AWS instance sizing for self-hosting Discourse, geek shares that while a t2.micro instance (1GB RAM) initially worked, it became unusable under light traffic due to 502/504 errors and high load — upgrading to t2.small resolved the issues. geek notes their forum has 26k topics and 135k posts, with a 2GB swapfile. codinghorror adds that given the forum’s age (since 2013) and traffic, minimum specs are insufficient. sat confirms they’ll start with t2.small and asks about SSD size for ~500 daily visitors; pfaffman recommends at least 30GB, ideally 50GB. sat plans to start with 30GB and upgrade if needed. Stephen cautions that resizing storage may cause site interruptions. The consensus is that t2.small is the bare minimum for Discourse on AWS, especially for active forums.

This is just an FYI to help anybody else in the future.

We are in the process of switching our infrastructure from Linode to AWS, and since our forum doesn’t get much traffic, we figured it would make sense to try the smallest instance that meets the Discourse specifications (1GB of RAM) – so we tried a t2.micro instance with extra block storage.

It initially worked, loaded, and restored from backup. It was a little slow during initial testing. As soon as the DNS switched over and we started getting a little bit of traffic, our Discourse instance became completely unusable, with 504 Gateway errors or 502 errors almost every page load. The logs showed tons of timeouts, and the load was incredibly high.

Upgraded from t2.micro to t2.small and now everything is working great.

Lesson: t2.small is the bare minimum for Discourse on AWS.

How big is your forum? How many posts? How big is the database?

Also, how big was the swapfile you created?

2gb swapfile.

I’m not sure how big the database is. We have 26k topics and 135k posts.

Your forum has been around a while (since 2013) and gets a fair bit of traffic! I would definitely not recommend a minimum spec config in this case.

I was thinking to ask same question but found your feedback about t2 micro instance. I will go with t2 small for now. :slight_smile: thanks!

One question, How much SSD I should use with t2 small. My forum will have around 500 visitors/day.

I would recommend a minimum of 30GB and would push for 50gb.

@pfaffman, Ok thank you. I will go with 30GB initially and if required will upgrade to 50GB. I hope that should be enough for now.

As long as you can live with the interruption to your site when you either migrate or resize the volume that’s fine.