Wie viel RAM wird für Discourse benötigt?

Hi,

I’ve recently installed Discourse on my own VPS. I have only 2 GB of RAM. Is this sufficient to run a forum in production? There have been times where I got a 502 gateway error which maybe due to lack of memory. Sometimes, after installing a plugin, I have to refresh my admin panel several times.

Other threads say 1 GB of RAM is enough, but what is realistic? I’m using the latest docker image by bitnami. Some say that sidekiq can take up to 4 GB of RAM: https://github.com/bitnami/bitnami-docker-discourse/issues/150

1 „Gefällt mir“

You can easily run Discourse off a VPS with 2GB of RAM. You may want to consider setting up swap if you don’t have that already. Running ./discourse-setup will do this for you.

3 „Gefällt mir“

I did initially setup swap, but if I use swap memory, it slows it down by a lot, so by default, I didn’t want to do that.

1 „Gefällt mir“

Our default configuration should only use swap under pressure, like during web updates.

If you host a large community and start experiencing slows response times from the Discourse API you can increase the CPU/RAM of your server and re-run ./discourse-setup so it starts using the augmented resources.

6 „Gefällt mir“

Is this a new community or did you import a large database? How much traffic do you expect? Single thread cpu speed as well as SSD for storage are critical.

1 „Gefällt mir“

I didn’t import any database. This is a fresh forum with 0 posts. The only traffic is me at the moment. However, I do expect traffic that could be up to 1000 users visiting the site a day.

Oh. Don’t do that. Or ask them why your performance sucks.

See: Discourse official Standard Installation

4 „Gefällt mir“

Curious as to why you advocate against using the bitnami image? (assumably @AntiMetaman is referring to their new helm charts here.

But also, they’ve got new a new helm chart here

We, the team that develop Discourse, only test it against our own base image. Installs that don’t follow the Install Discourse in production with the official, supported instructions may subtle break anytime and we won’t provide support for it.

4 „Gefällt mir“

Just FYI, and offering a different perspective @AntiMetaman

Although Discourse can run on a VPS with minimal RAM, when you build and rebuild Discourse it will be quite slow compared to building on a machine with more RAM. I personally would not run a “truly” production Discourse app on 2GB of RAM, but that is just me.

FWIW (just my opinion only), I have installed Discourse on machines with 1GB, 2GB, 8GB, 32GB and 64 GB RAM servers, both VPM and dedicated, and honestly I like building Discourse on my 64 GB and 32GB machines. It’s so fast to build on 64GB :). Blazing fast to rebuild and runs so good, smooth like butter on hot toast. So, I prefer to run Discourse on “bigger” machines (more RAM, more disk space) with other applications than run in standalone mode on very small slices with minimal RAM.

However, that is based on my personal experience with Discourse and Docker and preferences. I like Discourse to rebuild fast and have plenty of “head room” in production and 2GB does not meet my requirements for build speed.

4 „Gefällt mir“

Discourse recommends 1GB as the minimum and I have ran installations this way and it gets slow quick, therefore I would go with 2GB.

This first 2GB last a long mile I currently run a community with ~3500 visits/day without Crawlers and some 20-30 posts per day I haven’t seen any issue with the 2GB of RAM and haven’t noticed any slow downs.

I’m almost sure @AntiMetaman that your issue is with the Bitnami image and not resources. Make sure you CPU is fast enough and if you’re able give it a second CPU (I only use 1vCPU and does the job).

4 „Gefällt mir“

The bitnami image is still using the stable 2.4.4. The only reason I went with bitnami was because it had a standard docker-compose.yml, so the installation process was easier. Some people who have tried to upgrade to 2.6.0 beta 1 using the official Discourse image failed. I’ll try the official discourse image and see how it goes.

1 „Gefällt mir“

Good idea, third party packages such as the bitnami install get zero support here.

As you’ve already noted it’s also quite out of date.

2 „Gefällt mir“

Hallo @Falco – meinen Sie, dass dieser Befehl in der Konsole ausgeführt werden soll, oder reicht es aus, den Setup-Assistenten www.mysite.com/wizard auszuführen?

1 „Gefällt mir“

Das sind eigentlich zwei verschiedene Dinge. :slight_smile:

Der /wizard ist für Benutzeroberfläche und Admin-Einstellungen, um Ihre Website nach der Installation einzurichten, und wird über Ihre Website/Browser aufgerufen.

discourse-setup ist Teil des Installationsprozesses selbst, der (teilweise) Serverressourcen zuweist und vom Server aus ausgeführt wird.

Sie können discourse-setup mehrmals ausführen, und es werden keine Ihrer Website-Daten überschrieben.

3 „Gefällt mir“

Danke für die Klarstellung @JammyDodger, sehr geschätzt.

Meine Website wurde ziemlich träge, also habe ich dem Server mehr RAM hinzugefügt. Sie scheint jetzt mit einer Zuweisung von 2048 MB Shared Buffers statt 128 MB viel besser zu laufen.

Ich hatte zuvor die Datei app.yml manuell bearbeitet und per SFTP hochgeladen, und gerade eben ist mir eine Berechtigungswarnung aufgefallen, als ich die App neu aufgebaut habe. Wie sollte die Datei app.yml eingestellt sein?

644 oder 600. Ich glaube, die Nachricht, auf die Sie sich beziehen, sagt Ihnen, was es sein sollte.

1 „Gefällt mir“

Danke @pfaffman!

1 „Gefällt mir“