A user is experiencing high memory usage on a Discourse instance with no traffic, despite having 8GB of RAM. After importing 240,000 posts from a VBulletin forum, the system gradually consumes all memory, eventually becoming unresponsive. The issue persists even after rebuilding the container and clearing Sidekiq tasks. The user identifies that Redis is consuming nearly 5GB of memory, leaving little for Discourse. Falco suggests flushing Redis, which resolves the issue temporarily. The user also notes that the unicorn workers setting doesn’t seem to affect the actual number of workers. Haddoq confirms that flushing Redis significantly reduces memory usage, suggesting the import process may leave residual data in Redis. The user considers restoring a database backup to improve performance.
So I’m testing out Discourse as a possible destination for our existing forum and I’m trying to figure out the requirements.
Currently I’m running the Discourse droplet on a Digitalocean node with 4vCPUs and 8GB ram.
With the imported vbulletin site running here with no traffic and no activity, the system starts out using about 75% of that 8gb ram and over a few days goes up to 100% then stops responding completely.
This confuses me since the minimum required seems to be a lot less than this.
( I have rebuilt the container, I have checked and cleared sidekiq tasks, still high usage)
Anyone got any tips ro should I be looking at a monster RAM setup just to keep the forum up?
The system may be rebaking posts and re-sizing images, which could use a lot of resources even if you have no users. You can look at /sidekiq to see if there are a bunch of jobs queued and/or running. Also, htop may give you some hints about what’s running.
Import was about 5 weeks ago, been through 5 app rebuilds since that seems to be what solves the memory issue once the container goes into 100% mem unresponsiveness.
Cleared all tasks in sidekiq as mentioned and the usage is still at 75%
The memory graph since I rebuilt the server yesterday:
The unicorn worker issue was one that I checked on fairly early. I changed both the ram usage for db_shared_buffers and also set the unicorn workers to 3.
The unicorn workers setting seems to have little to no effect on the number of workers that actually run though
From my app.yml file
## How many concurrent web requests are supported? Depends on memory and CPU cores.
## will be set automatically by bootstrap based on detected CPUs, or you can override
UNICORN_WORKERS: 3