We’ve had our internal Discourse site for around 3 months now and suddenly it has gone into read only mode.
Based on other topics (Stuck in 'Read Only' Mode) I have already tried the following:
- Login to docker instance:
./launcher enter app
- Login to rails:
- Disable read only:
- Quit rails:
- Exit container:
After doing this, our application seems to come out of read only mode, then goes back to read only mode.
I tried to rebuild a container but now I am getting the following error:
"Caused by: PG::ReadOnlySqlTransaction: ERROR: cannot execute ALTER TABLE in a read-only transaction /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-mini-profiler-1.0.0/lib/patches/db/pg.rb:92:in `async_exec' /var/www/discourse/vendor/bundle/ruby/2.4.0/gems/rack-mini-profiler-1.0.0/lib/patches/db/pg.rb:92:in `async_exec'"
I guess because it’s stuck in read only mode for some reason?
Current setup is:
- 4 containers (2 cannot rebuild based on above, 2 are still running from 2 weeks ago)
- Elasticache Redis
- RDS PostgreSQL