I have the latest version of discourse running on a 2GB / 1CPU / 40GB SSD Ubuntu 14.04.5 DigitalOcean droplet. It has been fine for the longest time, and I recently resized the old plan that was the same specs from $20/mo. to this one that is $10/mo. After resizing everything it was running and very snappy (better than before I’d say), but now it will load the main site but if I click on any topics it won’t load and ends up crashing the instance.
Any advice on where to go digging for the right logs?
“failed to allocate memory” sounds like maybe the database is tuned to use too much ram from the previous plan, my empty test instance uses about 1gb on a 4gb centos vm
[root@discocent discourse]# free
total used free shared buff/cache available
Mem: 3881412 912764 413192 33168 2555456 2401820
Swap: 2097148 1544 2095604
Does the droplet have any swap configured? Have you tried rebuilding the app container?
Check for out-of-memory errors in dmesg or /var/log/syslog too
Try to tail -f /var/discourse/shared/standalone/log/rails/production.log when opening a topic and look for error messages there maybe, that log is pretty verbose.
Yes I tried rebuilding which finishes fine and loads the site.
Memory available should be the same as before, 2GB.
It does appear something is consuming up all of the memory… and there are lots of threads on here that say discourse can run on the smallest droplet. My site is basically a ghost town as well… so nothing should be consuming so much RAM.
Oh here we go…
this is just after rebooting the disc, running free -m every second.
Important Note: Expect high CPU usage for a few hours after this upgrade due to image re-optimization. Sites with large numbers of images may see high CPU usage for a longer period of time.
It could be that you need to tune the number of unicorn workers and reduce the cache size for the database for that initial optimization to work.