# Discourse stuck when updating

**URL:** https://meta.discourse.org/t/discourse-stuck-when-updating/280472
**Category:** Self-hosting
**Created:** [September 28, 2023, 9:34pm UTC](https://meta.discourse.org/t/discourse-stuck-when-updating/280472 "2023-09-28T21:34:32Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![AlexCR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexcr/32/329984_2.png) [@AlexCR](https://meta.discourse.org/u/AlexCR)
#### Post date: [September 28, 2023, 9:34pm UTC](https://meta.discourse.org/t/discourse-stuck-when-updating/280472/1 "2023-09-28T21:34:32Z")

</div>

Hi,

I’m in charge of running a Discourse forum for one organization I’m part of. It’s running on an Ubuntu 18.04 box on AWS. I’m somewhat familiar with Ubuntu, not really with Discourse.

I’ve tried upgrading to the latest version and get stuck. Here’s what I’ve tried:

```plaintext
# apply security updates
apt-get update
apt-get dist-upgrade

# update packages
apt-get update
apt-get upgrade

# update Docker
wget -qO- https://get.docker.com/ | sh

# try updating Discourse again
cd /var/discourse
./launcher rebuild app

```

Whenever I reach the following steps the update hangs:

```plaintext

I, [2023-09-28T21:24:31.330675 #1] INFO -- : > cd /var/www/discourse && gem install bundl
er --conservative -v $(awk '/BUNDLED WITH/ { getline; gsub(/ /,""); print $0 }' Gemfile.lo
ck)
I, [2023-09-28T21:24:32.423727 #1] INFO -- : Successfully installed bundler-2.4.13
1 gem installed

I, [2023-09-28T21:24:32.424286 #1] INFO -- : > cd /var/www/discourse && find /var/www/dis
course ! -user discourse -exec chown discourse {} \+
I, [2023-09-28T21:26:48.768332 #1] INFO -- : 
I, [2023-09-28T21:26:48.769200 #1] INFO -- : > cd /var/www/discourse && if [ "tests-passe
d" != "tests-passed" ]; then
  rm -rf app/assets/javascripts/node_modules
fi
I, [2023-09-28T21:26:48.771875 #1] INFO -- : 
I, [2023-09-28T21:26:48.772302 #1] INFO -- : > cd /var/www/discourse && su discourse -c '
yarn install --frozen-lockfile && yarn cache clean'
warning " > @glint/environment-ember-loose@1.1.0" has unmet peer dependency "@glimmer/comp
onent@^1.1.2".
warning " > @glint/environment-ember-template-imports@1.1.0" has unmet peer dependency "em
ber-template-imports@^3.0.0".
warning " > @mixer/parallel-prettier@2.0.3" has unmet peer dependency "prettier@^2.0.0".

```

`htop` shows a few `yarn.js` processes that seem stuck:

```plaintext
13727 ubuntu 20 0 911M 160M 29000 S 2.7 16.5 0:54.90 node /usr/share/yarn/bin/yarn.js install --frozen-lockfile
13747 ubuntu 20 0 911M 160M 29000 D 0.7 16.5 0:04.90 node /usr/share/yarn/bin/yarn.js install --frozen-lockfile

```

Anything I can try?

Thanks in advance.

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [September 29, 2023, 3:23am UTC](https://meta.discourse.org/t/discourse-stuck-when-updating/280472/2 "2023-09-29T03:23:05Z")

</div>

> [@AlexCR](#):
>
> It’s running on an Ubuntu 18.04 box on AWS. I’m somewhat familiar with Ubuntu, not really with Discourse.
> 
> I’ve tried upgrading to the latest version and get stuck.

In case it’s relevant, what version of Discourse are you upgrading from?

> [@AlexCR](#):
>
> ```plaintext
> cd /var/www/discourse && su discourse -c '
> yarn install --frozen-lockfile && yarn cache clean'
> 
> ```

It seems that this is where things are getting stuck. It’s a longshot, but possibly this is related: [Stuck on yarn install, Time out](https://meta.discourse.org/t/stuck-on-yarn-install-time-out/227738).

It might be worth confirming that your server meets the software requirements shown here: [discourse/docs/INSTALL.md at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/main/docs/INSTALL.md).

---

<div class="post-metadata">

### Author: ![AlexCR](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alexcr/32/329984_2.png) [@AlexCR](https://meta.discourse.org/u/AlexCR)
#### Post date: [September 30, 2023, 10:08am UTC](https://meta.discourse.org/t/discourse-stuck-when-updating/280472/3 "2023-09-30T10:08:30Z")

</div>

> [@simon](#):
>
> It seems that this is where things are getting stuck. It’s a longshot, but possibly this is related: [Stuck on yarn install, Time out](https://meta.discourse.org/t/stuck-on-yarn-install-time-out/227738).

Well you were right about this one. I’ve followed the same procedure and the update went through instead of timing out. It took a long time to run (~20 hours) because the machine was overloaded, but that’s another story.

Thanks for helping out.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [October 30, 2023, 10:09am UTC](https://meta.discourse.org/t/discourse-stuck-when-updating/280472/4 "2023-10-30T10:09:21Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
