# 重建卡在“正在构建…”？

**URL:** https://meta.discourse.org/t/rebuild-stuck-on-building/217373
**Category:** Self-hosting
**Created:** [2022年二月7日 19:11 UTC](https://meta.discourse.org/t/rebuild-stuck-on-building/217373 "2022-02-07T19:11:59Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![gale](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@gale](https://meta.discourse.org/u/gale)
#### Post date: [2022年二月7日 19:11 UTC](https://meta.discourse.org/t/rebuild-stuck-on-building/217373/1 "2022-02-07T19:11:59Z")

</div>

运行 `sudo ./launcher rebuild app` 后一切似乎都正常，但在过程的最后，“building…”似乎卡住了。现在已经 30 分钟了。我从未见过重建需要这么长时间，或者卡在这一点上。检查 `top`，没有任何东西在对系统造成任何有意义的负载。

```plaintext
...大量的日志输出 - 所有我习惯在重建过程中看到的正常内容
I, [2022-02-07T18:39:08.172725 #1228] INFO -- : Writing /var/www/discourse/public/assets/logo-single-d7a0dacc998273856c42737dba8693fbdb9e5fd929d36afeb3f13844f147e865.png
I, [2022-02-07T18:39:08.175841 #1228] INFO -- : Writing /var/www/discourse/public/assets/logo-ba2f2da6eac779d8b34d4aa977be739e4de07f7d34e970f4b8ac32682706c122.png
I, [2022-02-07T18:39:08.178997 #1228] INFO -- : Writing /var/www/discourse/public/assets/push-notifications/check-f64a79b1bde9a9e1f6fdc1ab382163596a06e3ae71443bb8c8231aa595bcbc80.png
I, [2022-02-07T18:39:08.182201 #1228] INFO -- : Writing /var/www/discourse/public/assets/push-notifications/discourse-bdbc548a4e328f39b017bb143b679c5dfe7b060574760cd71d77971c2a9eff1f.png
I, [2022-02-07T18:39:08.186061 #1228] INFO -- : Writing /var/www/discourse/public/assets/push-notifications/group_mentioned-012ba348812e600c5532b8ccc08e8767b16fd126f3c7bcedcbdedaba640721d6.png
I, [2022-02-07T18:39:08.190513 #1228] INFO -- : Writing /var/www/discourse/public/assets/push-notifications/linked-02191f88212f5cba22760235346da4e238eb9a4c9056cac92965a940eeaa02d0.png
I, [2022-02-07T18:39:08.194565 #1228] INFO -- : Writing /var/www/discourse/public/assets/push-notifications/mentioned-012ba348812e600c5532b8ccc08e8767b16fd126f3c7bcedcbdedaba640721d6.png
I, [2022-02-07T18:39:08.198835 #1228] INFO -- : Writing /var/www/discourse/public/assets/push-notifications/posted-918b5c4333d62ea140dfc63a49d1ee60e71f00418b8f2f7fa91bb65a2c995830.png
I, [2022-02-07T18:39:08.203082 #1228] INFO -- : Writing /var/www/discourse/public/assets/push-notifications/private_message-77576c8c5017882f813792be99ee57b2ddaa417c2baf74255a9899867ad66b97.png
I, [2022-02-07T18:39:08.207149 #1228] INFO -- : Writing /var/www/discourse/public/assets/push-notifications/quoted-a1bf4d7b4f4ad6b34b43d60143a7e07ddc030855eae2cf9308011ba91a3ce168.png
I, [2022-02-07T18:39:08.210809 #1228] INFO -- : Writing /var/www/discourse/public/assets/push-notifications/replied-918b5c4333d62ea140dfc63a49d1ee60e71f00418b8f2f7fa91bb65a2c995830.png
- Building
- Building
- building... 

```

有什么关于这里可能发生的事情以及如何解决它的想法吗？这目前是一个相当大的问题，因为它完全阻止了网站运行。谢谢！

---

<div class="post-metadata">

### Author: ![gale](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@gale](https://meta.discourse.org/u/gale)
#### Post date: [2022年二月7日 19:39 UTC](https://meta.discourse.org/t/rebuild-stuck-on-building/217373/2 "2022-02-07T19:39:22Z")

</div>

好消息。它最终完成了构建并正常启动（大约晚了 45 分钟）。不确定为什么比平时花费的时间长这么多，而且它似乎长时间什么都没做。是不是可以增加一些额外的输出，当它到达那个阶段时？

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2022年二月7日 20:02 UTC](https://meta.discourse.org/t/rebuild-stuck-on-building/217373/3 "2022-02-07T20:02:01Z")

</div>

很高兴听到它最终完成了！您能分享一下您的服务器配置吗？您有多少内存/交换空间？

---

<div class="post-metadata">

### Author: ![gale](https://avatars.discourse-cdn.com/v4/letter/g/a9a28c/32.png) [@gale](https://meta.discourse.org/u/gale)
#### Post date: [2022年二月7日 20:20 UTC](https://meta.discourse.org/t/rebuild-stuck-on-building/217373/4 "2022-02-07T20:20:18Z")

</div>

总共 4GB RAM，但其中 2GB 已被服务器上的其他进程占用（通过 Apache 托管了几个 WordPress 网站和一个 MySQL 数据库）。

这是一台 2 核 Intel Digital Ocean droplet。默认设置下没有交换空间。

---

<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: [2022年二月7日 20:36 UTC](https://meta.discourse.org/t/rebuild-stuck-on-building/217373/5 "2022-02-07T20:36:48Z")

</div>

那个服务器出了非常非常大的问题。我怀疑是磁盘速度极慢（也许是老式的旋转硬盘而不是现代的 M.2 SSD？），因为这会严重影响性能。在命令行运行一些基本的磁盘基准测试。

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2022年二月7日 20:41 UTC](https://meta.discourse.org/t/rebuild-stuck-on-building/217373/6 "2022-02-07T20:41:55Z")

</div>

> [@JavaScript heap out of memory due to Ember CLI](https://meta.discourse.org/t/javascript-heap-out-of-memory-due-to-ember-cli/217258/5):
>
> We’re going to temporarily revert our new Ember CLI build pipeline so we can debug things in lower memory environments.

> [@JavaScript heap out of memory due to Ember CLI](https://meta.discourse.org/t/javascript-heap-out-of-memory-due-to-ember-cli/217258/8?u=david):
>
> This change is now reverted while we investigate further. Thanks everyone for the reports!

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [2022年二月8日 13:08 UTC](https://meta.discourse.org/t/rebuild-stuck-on-building/217373/7 "2022-02-08T13:08:55Z")

</div>


