# Discourse stuck on "Currently Upgrading"

**URL:** https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072
**Category:** Self-hosting
**Created:** [5 februari 2016 om 00:29 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072 "2016-02-05T00:29:49Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Chili](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chili/32/40331_2.png) [@Chili](https://meta.discourse.org/u/Chili)
#### Post date: [5 februari 2016 om 00:29 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/1 "2016-02-05T00:29:49Z")

</div>

Been having an odd problem with our Discourse instance recently.

It seems to be stuck on Currently Upgrading (even when there are no upgrades available):

 ![](https://global.discourse-cdn.com/meta/original/3X/c/f/cfd575a631a31f3aba9b7bbae91f8d1f3f0f3ea1.png)

There is no way to upgrade from within the web ui. When there are upgrades available, when I click on it the console window is just a blank screen. I need to do a ./launcher rebuild to upgrade, and even then it sometimes hangs on the stop app command, and I have to reboot the server to get the forum back.

There is nothing in the logs that I can see that pertains to this error.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [5 februari 2016 om 00:34 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/2 "2016-02-05T00:34:06Z")

</div>

Bring out the 🔨

```plaintext
cd /var/discourse
git pull
./launcher rebuild app

```

---

<div class="post-metadata">

### Author: ![Chili](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chili/32/40331_2.png) [@Chili](https://meta.discourse.org/u/Chili)
#### Post date: [5 februari 2016 om 00:44 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/3 "2016-02-05T00:44:42Z")

</div>

I’ve run those commands many times but the problem still remains (just tried it again and still stuck on “Currently Upgrading”).

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [5 februari 2016 om 00:45 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/4 "2016-02-05T00:45:35Z")

</div>

I thought when you go to the currently upgrading page you can “cancel” it, does that work around the issue?

---

<div class="post-metadata">

### Author: ![Chili](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chili/32/40331_2.png) [@Chili](https://meta.discourse.org/u/Chili)
#### Post date: [5 februari 2016 om 00:54 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/5 "2016-02-05T00:54:36Z")

</div>

Thank you, that solved it! I feel a bit silly now. 😊

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [5 februari 2016 om 04:28 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/6 "2016-02-05T04:28:33Z")

</div>

no need to feel silly… the idea that a rebuild should reset the `Upgrading...` state has come up before:

[https://meta.discourse.org/t/upgrade-currently-upgrading-forever/35850/?u=watchmanmonitor](https://meta.discourse.org/t/upgrade-currently-upgrading-forever/35850/)

and

> [@"Currently upgrading" even after a rebuild](https://meta.discourse.org/t/currently-upgrading-even-after-a-rebuild/33557/7):
>
> Had you started an upgrade in the web side before you did it on the command line? I’m just trying to understand how the flag got stuck in that position. The easiest way to unlock it is to flush redis. $ ./launcher enter app $ redis-cli flushall

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [5 februari 2016 om 04:37 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/7 "2016-02-05T04:37:26Z")

</div>

Really at some point we should set it up to auto reset on failure.

---

<div class="post-metadata">

### Author: ![steko](https://avatars.discourse-cdn.com/v4/letter/s/c77e96/32.png) [@steko](https://meta.discourse.org/u/steko)
#### Post date: [8 april 2016 om 06:56 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/8 "2016-04-08T06:56:08Z")

</div>

But when I click _Reset upgrade_ a modal window says

> WARNING: You should only reset upgrades that have failed and are not running.
> 
> This will NOT cancel currently running builds and should only be used as a last resort.

😖

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [8 april 2016 om 07:03 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/9 "2016-04-08T07:03:03Z")

</div>

Sure, if at any point you feel even a bit worries I recommend

```plaintext
cd /var/discourse
./launcher rebuild app

```

---

<div class="post-metadata">

### Author: ![watchmanmonitor](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/watchmanmonitor/32/430970_2.png) [@watchmanmonitor](https://meta.discourse.org/u/watchmanmonitor)
#### Post date: [9 april 2016 om 17:24 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/10 "2016-04-09T17:24:08Z")

</div>

@sam that didn’t clear the rebuilding flag in my experience here ["Currently upgrading" even after a rebuild](https://meta.discourse.org/t/currently-upgrading-even-after-a-rebuild/33557/2):

> [@"Currently upgrading" even after a rebuild](https://meta.discourse.org/t/currently-upgrading-even-after-a-rebuild/33557/2):
>
> We should have the rebuild clear the upgrading flag in Redis.

---

<div class="post-metadata">

### Author: ![metakermit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/metakermit/32/119609_2.png) [@metakermit](https://meta.discourse.org/u/metakermit)
#### Post date: [13 juni 2016 om 09:37 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/11 "2016-06-13T09:37:55Z")

</div>

I also seem to have these endless “currently upgrading” problems on every upgrade.

 ![](https://global.discourse-cdn.com/meta/original/3X/2/a/2af36d53adc70658ae4452f530afdabfe593d34f.png)

Doing the recommended commands does solve it …

> [@sam](#):
>
> Bring out the 🔨
> 
> cd /var/discourse  
> git pull  
> ./launcher rebuild app

… but it seems kind of weird to have to do these manual commands on every single upgrade, especially given that I receive emails to upgrade fairly frequently. Is there possibly something wrong in my setup if the upgrade process can’t properly upgrade itself? I tried to follow the official instructions for everything I did so far.

The console window when I click the “currently upgrading” link shows nothing (the progress bar is on 0):

 ![](https://global.discourse-cdn.com/meta/original/3X/3/a/3a623bfe80d3eb9774919ece5a33eaf1360f9438.png)

These are the processes running:

 ![](https://global.discourse-cdn.com/meta/original/3X/c/f/cf169873408ddffa6c8731b49d16d25f181828bb.png)

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [13 juni 2016 om 10:38 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/12 "2016-06-13T10:38:36Z")

</div>

Do you have 2gb of swap space on your install? If not you can expect to have problems.

---

<div class="post-metadata">

### Author: ![metakermit](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/metakermit/32/119609_2.png) [@metakermit](https://meta.discourse.org/u/metakermit)
#### Post date: [13 juni 2016 om 11:25 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/13 "2016-06-13T11:25:27Z")

</div>

Hm … I don’t have swap enabled, since I’m running the instance on a DigitalOcean VM that uses SSD storage. My VM does have 2 GB of RAM as required by the Digital Ocean Discourse droplet. The [Discourse-authored Digital Ocean instructions](https://www.digitalocean.com/community/tutorials/how-to-install-discourse-on-ubuntu-14-04) and [Digital Ocean themselves](https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04) don’t recommend enabling swap:

> Although swap is generally recommended for systems utilizing traditional spinning hard drives, using swap with SSDs can cause issues with hardware degradation over time. Due to this consideration, we do not recommend enabling swap on DigitalOcean or any other provider that utilizes SSD storage. Doing so can impact the reliability of the underlying hardware for you and your neighbors. Hence, we recommend a minimum of 2 GB of RAM to run Discourse on a DigitalOcean Droplet.

Do you think I should still enable some amount of swap despite the warning and hope it won’t be used during normal operation or just not enable it and bump the RAM instead?

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [13 juni 2016 om 17:17 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/14 "2016-06-13T17:17:51Z")

</div>

Haha yes that is complete political BS 😉 swap does not cause degradation, it prevents out of memory errors under memory strain, like the ones you are seeing.

---

<div class="post-metadata">

### Author: ![amotl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/amotl/32/109873_2.png) [@amotl](https://meta.discourse.org/u/amotl)
#### Post date: [18 september 2018 om 11:58 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/15 "2018-09-18T11:58:30Z")

</div>

We wanted to inform you that we just ran into this issue for the first time and “`launcher rebuild app`” didn’t help, so we followed the advice from @eviltrout by flushing Redis:

> [@"Currently upgrading" even after a rebuild](https://meta.discourse.org/t/currently-upgrading-even-after-a-rebuild/33557/7):
>
> Had you started an upgrade in the web side before you did it on the command line? I’m just trying to understand how the flag got stuck in that position. The easiest way to unlock it is to flush redis. $ ./launcher enter app $ redis-cli flushall

Hitting the “Reset Upgrade” button sounded too risky for us as it suggests anything would be rolled back, which we didn’t want to do because everything seemed to work flawlessly after the upgrade got applied successfully, as always.

At this place, we want to tell you that every time we hit the “Upgrade Discourse” button, we are again amazed by the shipping and production deployment quality of Discourse. Kudos to the whole team and keep up the spirit!

---

<div class="post-metadata">

### Author: ![Peter\_Backgren](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/peter_backgren/32/66263_2.png) [@Peter\_Backgren](https://meta.discourse.org/u/Peter_Backgren)
#### Post date: [26 april 2019 om 18:08 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/16 "2019-04-26T18:08:52Z")

</div>

Just adding another use case here with all the known problems. Thankfully there was help here as always (eventually after asking but _always_ 🙂 ).

Using a DO 30G maybe 5 year old installation. Yes, I know that’s pretty much asking for trouble, I haven’t had time to even check out their last 2 year ago upgrade so…

Got the Discourse Currently Upgrading, could not reset it.

Cursed having to ssh in to fix things, and of course I had 24G used which did NOT free up enough using the usual methods.

Eventually found the autoclean and autoremove which gave me another 5G and then things got better.

_Could those two perhaps be a question in the rebuild when you run out of disk space?_

Anyway, I guess even docker upgraded as I had both upgrades waiting.

The only question here really is, why on earth did I even end up in some “auto upgrade”? I specifically upgrade with 3-6 month intervals depending on when I have time to sit here and figure out why things went wrong this time 😉 . Of the last four upgrades only one has gone through nicely (yes, did I mention disk space already lol).

End nag :

I simply want a running forum, one I can take care of from anywhere, without having to resort to ssh and public/private keys etc which I don’t have access to everywhere.

So a MS-style forced upgrade (even if there is a setting somewhere which I have NOT selected specifically) is a real no-no when the result possibly is a non-working forum when you get annoyed of the dashboard nags.

But never mind, I would not change this software to anything else. If nothing else it keeps my outdated Linux knowledge up to date a bit 😃 .

---

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [17 februari 2020 om 02:38 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/17 "2020-02-17T02:38:13Z")

</div>

After rebuilding via command line, the “Currently Upgrading…” is still there.

And the “Reset” button does nothing

 ![image](https://global.discourse-cdn.com/meta/original/3X/7/a/7a8127c58c980d5ee8b4741706b1a95a643be412.png)

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [17 februari 2020 om 04:45 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/18 "2020-02-17T04:45:26Z")

</div>

You can work around probably by flushing redis

```plaintext
./launcher enter app
rails c
Discourse.redis.flushall

```

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [17 februari 2020 om 04:54 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/19 "2020-02-17T04:54:06Z")

</div>

FWIW I have a site that’s doing the same thing.

---

<div class="post-metadata">

### Author: ![Peter\_Backgren](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/peter_backgren/32/66263_2.png) [@Peter\_Backgren](https://meta.discourse.org/u/Peter_Backgren)
#### Post date: [2 oktober 2021 om 10:04 UTC](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072/20 "2021-10-02T10:04:52Z")

</div>

Just my two cents…

Upgrade Docker first, before that you don’t get useful information like this one (you are just stuck on the Currently Upgrading).

* * *

You are running an old version of the Discourse image.  
Upgrades via the web UI are disabled until you run the latest image.

To do so log in to your server using SSH and run:

```
    cd /var/discourse
    git pull
    ./launcher rebuild app

```

[Next page](https://meta.discourse.org/t/discourse-stuck-on-currently-upgrading/39072.md?page=2)
