# Discourse stuck in maintenance mode

**URL:** <https://meta.discourse.org/t/discourse-stuck-in-maintenance-mode/233602>\
**Category:** Self-hosting\
**Created:** [July 22, 2022, 1:46am UTC](https://meta.discourse.org/t/discourse-stuck-in-maintenance-mode/233602 "2022-07-22T01:46:44Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![41821](https://avatars.discourse-cdn.com/v4/letter/4/c4cdca/32.png) [@41821](https://meta.discourse.org/u/41821)\
**Post date:** [July 22, 2022, 1:46am UTC](https://meta.discourse.org/t/discourse-stuck-in-maintenance-mode/233602/1 "2022-07-22T01:46:44Z")

</div>

Hello, my discourse server is stuck in maintenance mode.  
I have left it in maintenance mode for several months on purpose, I’ve upgraded to many versions since initially setting it to maintenance mode.

My session has expired and I’ve been logged out, now I can’t log back in.

I can SSH to the discourse server.  
I have tried the following steps:

1. SSH to discourse server
2. navigate to `/var/discourse`/
3. run: `./launcher enter app`
4. run `rails c`

I have tried several things to disable maintenance mode here.

```plaintext
[1] pry(main)> 
[2] pry(main)> 
[3] pry(main)> Discourse.disable_readonly_mode(Discourse::READONLY_MODE_KEY)
=> true
[4] pry(main)> Discourse.disable_readonly_mode
=> true

```

When I shift focus away from SSH and onto my web browser, I can see that the maintenance mode banner goes away.

then a few seconds it comes back again.

I’ve referenced these docs already:

> [@Stuck in 'Read Only' Mode](https://meta.discourse.org/t/stuck-in-read-only-mode/42820):
>
> Hi all, My site is suddenly in ‘read only’ mode, and I don’t know why. [chathamhouse.sandbaggernews.com](http://chathamhouse.sandbaggernews.com) A friend helped me set up Discourse, but unfortunately he’s left town for a Linux conference in Seattle stuck_out_tongue I’m trying to present this site to my professors tomorrow night. Really don’t know where to begin. Thanks so much, Stuck.

> [@How can Admin login while Read-only mode is enabled on multisite?](https://meta.discourse.org/t/how-can-admin-login-while-read-only-mode-is-enabled-on-multisite/23976):
>
> I did restore on my secondsite(multisite), but Read-only mode is enabled. How can I login? or How can I turn off Read-only mode? I tried: ./launcher enter app discourse disable\_readonly But nothing’s changed. (I tried ./launcher rebuild app also)

please help

---

_[View the full topic](https://meta.discourse.org/t/discourse-stuck-in-maintenance-mode/233602)._
