A user, fuse, experienced an issue with their Discourse instance running on an AWS Lightsail instance with 1 vCPU, 1GB RAM, and 40 GB SSD. The instance became unresponsive at 9:09pm ET, and fuse was unable to ssh into it. After restarting the instance, the service recovered.
fuse checked the logs and found an error related to Redis network connection at 9:05, which was puzzling since it’s a single instance. MarcP suggested that the issue might be due to resource constraints, possibly CPU. Stephen mentioned that 1GB RAM with swap is the minimum required to run Discourse.
fuse mentioned that the instance had been running fine since February 2021, and the database size was approximately 423MB. Falco suggested that the issue might be related to AWS moving the VM to a different host.
After a second similar failure, fuse upgraded the instance to 2 CPU, 4GB RAM, and 80 GB SSD using a Lightsail snapshot. Stephen recommended updating unicorn_workers to 4 and possibly re-running discourse-setup to take advantage of the upgraded resources.
I’ll check the db size, not expecting it to be large (backups are all about 57 MB).
Uptime of the instance is not quite ten hours now since recovery required stopping and restarting the virtual server- I could not get a shell or console connection.
Been running fine on this instance type since I built it (Feb 2021 as a guess).
This sounds like what happens when AWS moves your VM from one host to another and leaves it in a weird state because of it. Usually a reboot solves it.
I’ve moved using Lightsail snapshot from a 1 CPU, 1GB RAM 40GB SSD to a 2 CPU, 4GB RAM 80 GB SSD.
Aside from having to detach the public IP and reattach, which was straightforward enough, my remaining concerns is “what have I missed”?
Is there anything (backups, email, S3 bucket config, etc) that I should check or do I need to re-run any initial install parameters to take advantage of the upgraded resources?
I’m thinking based on this link I could bump the db_shared_buffer to at least 1GB.
Current app.yml says 128MB, also indicates auto adjust at bootstrap.