# Rebuild freezing when attempting to stop container

**URL:** https://meta.discourse.org/t/rebuild-freezing-when-attempting-to-stop-container/188704
**Category:** Self-hosting
**Created:** [April 30, 2021, 2:12pm UTC](https://meta.discourse.org/t/rebuild-freezing-when-attempting-to-stop-container/188704 "2021-04-30T14:12:49Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![ajmuir](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@ajmuir](https://meta.discourse.org/u/ajmuir)
#### Post date: [April 30, 2021, 2:12pm UTC](https://meta.discourse.org/t/rebuild-freezing-when-attempting-to-stop-container/188704/1 "2021-04-30T14:12:49Z")

</div>

I received my first **You are running an old version of the Discourse image. Upgrades via the web UI are disabled until you run the latest image** message today and I think I’ve broken my installation.

I followed the instructions, running each command as `sudo` because my hosting provider doesn’t permit the creation of root users.

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

```

I then had to re-run with `sudo git stash` before the `pull` as there was an error regarding clashes.

Everything seemed to progress ok (I left it over an hour) but then my Terminal session closed (broken pipe error). To overcome, I set `ClientAliveInterval` on the server to 60 as this was commented out, restarted, and tried again.

When the rebuild script now runs, it crashes when it goes to stop the docker container.

I tried to get around this by running `docker kill <id>` before running the rebuild script, but the same crash occurs (CPU at 100% for about 15mins…then nothing for hours).

When I reboot the site still comes up, but I’m unable to update it (the UI updater still says I’m running an old Discourse image).

Any advise gratefully received.

---

<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: [April 30, 2021, 5:01pm UTC](https://meta.discourse.org/t/rebuild-freezing-when-attempting-to-stop-container/188704/2 "2021-04-30T17:01:13Z")

</div>

It’s rather hard to guess without seeing the output of the build.

You might try using `tmux` (or similar) to keep the session open when you get disconnected (you can reconnect to the session with `tmux attach`).

Maybe have a look at [PostgreSQL 13 update](https://meta.discourse.org/t/postgresql-13-update/172563)?

---

<div class="post-metadata">

### Author: ![ajmuir](https://avatars.discourse-cdn.com/v4/letter/a/7feea3/32.png) [@ajmuir](https://meta.discourse.org/u/ajmuir)
#### Post date: [April 30, 2021, 8:22pm UTC](https://meta.discourse.org/t/rebuild-freezing-when-attempting-to-stop-container/188704/3 "2021-04-30T20:22:37Z")

</div>

Thanks Jay, I think I’ve found the issue.

My VPS provider, [webdock.io](http://webdock.io) (who are great by the way) don’t support zfs because they use it at the host level; I’m advised nested zfs is a no go. They also didn’t recommend overlay2 for my install and suggested I edit `launcher` to include the **vfs** storage driver, which isn’t there by default.

171‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ `Storage Driver: (vfs|aufs|zfs|overlay2)`  
‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎‎‏‏‎ ‎‏‏‎ ‏‏‎‎‏⬆️

I suspect `sudo git pull` overwrote this, and then I tried to rebuild with the wrong storage driver?

I’ve just rolled everything back and then re-edited `launcher` before running `rebuild app` and everything is working again.

```
cd /var/discourse
sudo git stash
sudo git pull
sudo nano launcher 

```

‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ then edit line 171 to include **vfs**

`sudo ./launcher rebuild app`

---

<div class="post-metadata">

### Author: ![epskpsdsc](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/epskpsdsc/32/269950_2.png) [@epskpsdsc](https://meta.discourse.org/u/epskpsdsc)
#### Post date: [August 8, 2022, 2:41pm UTC](https://meta.discourse.org/t/rebuild-freezing-when-attempting-to-stop-container/188704/4 "2022-08-08T14:41:17Z")

</div>

Hey @ajmuir ,  
I know you solved your problem over a year ago but I wanted to add my two cents to this discussion and also enable new users who find this thread to drive down the right path.

Webdock (now) recommends using fuse-overlayfs as the Docker storage driver to use: [How to change the Docker storage driver – Webdock](https://webdock.io/en/docs/how-guides/docker-guides/how-change-the-docker-storage-driver)

Reason being that vfs produces high disk space usage.

But using fuse-overlayfs for Docker will produce a warning or an error on the Discourse launcher side, since it is not a recommended driver.

I have detailed instructions on how to solve this in this post on my blog: [Deploying Discourse on a Webdock server](https://epsilonsynapse.com/webdock/deploying-discourse-on-a-webdock-server/)

You can also do it the way you did by adding the installed driver to the `egrep` statement.

And why do you say that Webdock doesn’t allow the creation of root users?  
You can simply switch to root with `sudo su` and execute the commands from the Discourse install guide after that.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [January 18, 2023, 10:59am UTC](https://meta.discourse.org/t/rebuild-freezing-when-attempting-to-stop-container/188704/5 "2023-01-18T10:59:26Z")

</div>


