This site is in read only mode

AI-generated summary

The user 5hark reports that their Discourse site intermittently enters read-only mode, even though the server is not overloaded and the forum has low usage. Despite attempting to disable read-only mode via Rails console, the issue persists. Restarting Redis and the database temporarily resolves it. nat suggests checking for unreliable connections to Redis or PostgreSQL, as well as disk space, referencing Discourse’s read-only mode documentation. 5hark confirms Redis and PostgreSQL run on the same server and no obvious issues are present, but will investigate further.

From time to time after working for about two days site ends up in read only mode. Forum is completely empty, there are almost no users using it, so website is definitely not overloaded anyhow. I tried suggestions from the following thread Discourse stuck in maintenance mode

Is doesn’t help:

# cd /media/data/discourse/
root@main:/media/data/discourse# ./launcher enter app
x86_64 arch detected.
root@main-app:/var/www/discourse# rails c
Loading production environment (Rails 7.2.2.1)
discourse(prod)> Discourse.disable_readonly_mode
=> true
discourse(prod)> Discourse.disable_readonly_mode(Discourse::READONLY_MODE_KEY)
=> true
discourse(prod)> Discourse.disable_readonly_mode
=> true

Server is not overloaded with any other app / service:

Restarting redis along with database helps. But is there any logs that I should check or how can I troubleshoot this problem?

Discourse version is 3.5.0.beta3-dev

There’s some info here: Read Only Modes in Discourse

Is your service provider for redis or postgres reliable? A bad connection to those services may cause your forum to go into readonly. Another thing is if your disk space is reaching capacity. If your backups run every 2 days and you’re seeing this happen, then it could be a related cause.

Redis and PostgreSQL are running on the same server. Seems there is no problem with any of those as well as disk space. But I will take a closer look at all this. Thank you!