The site can switch to read-only mode when databases return errors like “Redis is in a readonly state”.
There are multiple types of READONLY depending on the trigger. Discourse.disable_readonly_mode(Discourse::USER_READONLY_MODE_KEY)
will only turn off one, you have to pass the other keys to turn off the other types.