# “等待 Unicorn 重新加载”，随后更新停止

**URL:** <https://meta.discourse.org/t/waiting-for-unicorn-to-reload-then-update-stops/101533>\
**Category:** Support\
**Created:** [2018年十一月7日 14:06 UTC](https://meta.discourse.org/t/waiting-for-unicorn-to-reload-then-update-stops/101533 "2018-11-07T14:06:05Z")\
**Posts on this page:** 11\
**Page:** 2

<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:** [2019年二月8日 07:40 UTC](https://meta.discourse.org/t/waiting-for-unicorn-to-reload-then-update-stops/101533/22 "2019-02-08T07:40:54Z")

</div>

What are the hardware specs? Is it heavily memory constrained, or are the disks slow (not SSD)?

It’s not a problem to update via SSH command line if that works better, but it shouldn’t be _required_.

---

<div class="post-metadata">

**Author:** ![TReKiE](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trekie/32/108461_2.png) [@TReKiE](https://meta.discourse.org/u/TReKiE)\
**Post date:** [2019年二月10日 07:55 UTC](https://meta.discourse.org/t/waiting-for-unicorn-to-reload-then-update-stops/101533/23 "2019-02-10T07:55:36Z")

</div>

I’m not sure what the criteria is for constrained, the site has been relatively speedy (with no cloudflare, CDN or other tricks). It’s a KVM VM with 2GB. Here is an output from `free`:

> ```
> total used free shared buff/cache available
> Mem: 2047876 1263844 121092 280544 662940 325164
> Swap: 2097148 549032 1548116
> 
> ```

There is nothing else running on this but Discourse. However, the disks are definitely slow, non-SSD, in RAID-10, and shared with a few other VMs. I ran` iotop` as the nightly backup was going and didn’t see anything above 50MBps.

The exported non-compressed backup .sql is ~600MB, average daily engaged this past month \<50, and daily pageviews are \<6000 per day.

I do see one major difference in the output between [what you posted originally](https://meta.discourse.org/t/waiting-for-unicorn-to-reload-then-update-stops/101533/17) and what @danekhollas and I are getting. In our output, it takes Unicorn significantly longer to reload (based on the number of dots), however it’s always been that way since that was added to the upgrade process.

---

<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:** [2019年二月10日 08:50 UTC](https://meta.discourse.org/t/waiting-for-unicorn-to-reload-then-update-stops/101533/24 "2019-02-10T08:50:29Z")

</div>

The swap usage is fairly high there. This implies you have a busy instance. Also, slow disks are going to be quite painful in several dimensions.

---

<div class="post-metadata">

**Author:** ![danekhollas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/danekhollas/32/79637_2.png) [@danekhollas](https://meta.discourse.org/u/danekhollas)\
**Post date:** [2019年二月10日 14:32 UTC](https://meta.discourse.org/t/waiting-for-unicorn-to-reload-then-update-stops/101533/25 "2019-02-10T14:32:51Z")

</div>

In my case I have SSD and plenty RAM, but CPU is slow (1.7 GHz) and I usually have only around 7Gb free space on HDD. I noticed that Discourse seems to want at least 5Gb free during upgrade, could this be the issue?

Note that this problem started happening at a specific point in time (probably around this topic got started but I am not sure) and since then I was not able to upgrade via UI at all, which lead me to believe that something must have changed…

I gave @tgxworld access to my instance in case it is helpful.

---

<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:** [2019年二月10日 23:22 UTC](https://meta.discourse.org/t/waiting-for-unicorn-to-reload-then-update-stops/101533/26 "2019-02-10T23:22:24Z")

</div>

Note tgx is out for a bit, he may have a chance to have a quick look next week.

---

<div class="post-metadata">

**Author:** ![Kane\_Thomas](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kane_thomas/32/137561_2.png) [@Kane\_Thomas](https://meta.discourse.org/u/Kane_Thomas)\
**Post date:** [2019年六月1日 03:02 UTC](https://meta.discourse.org/t/waiting-for-unicorn-to-reload-then-update-stops/101533/27 "2019-06-01T03:02:42Z")

</div>

This also just happened to me, however it looks like the Docker Manager upgrade actually worked:

 ![Screenshot%20-%205_31_2019%20%2C%208_01_10%20PM](https://global.discourse-cdn.com/meta/original/3X/8/7/87821e371a469d691602b37ffa4aa811ac40add1.png)

 ![Screenshot%20-%205_31_2019%20%2C%208_01_22%20PM](https://global.discourse-cdn.com/meta/original/3X/3/2/321bae3ba45967479c4363be15d39994b1c6d532.png)

---

<div class="post-metadata">

**Author:** ![TReKiE](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/trekie/32/108461_2.png) [@TReKiE](https://meta.discourse.org/u/TReKiE)\
**Post date:** [2019年六月1日 04:55 UTC](https://meta.discourse.org/t/waiting-for-unicorn-to-reload-then-update-stops/101533/28 "2019-06-01T04:55:31Z")

</div>

Just to update since my last post ~4 months ago. I took the advice given and moved over to a whole new machine, with a significant RAM+CPU increase and switch to full SSD. This problem has not occurred again.

---

<div class="post-metadata">

**Author:** ![k4rtik](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/k4rtik/32/119508_2.png) [@k4rtik](https://meta.discourse.org/u/k4rtik)\
**Post date:** [2019年八月11日 19:48 UTC](https://meta.discourse.org/t/waiting-for-unicorn-to-reload-then-update-stops/101533/29 "2019-08-11T19:48:42Z")

</div>

最近几次尝试通过 Web 界面进行升级时，我也遇到了同样的问题。

我的实例托管在一台虚拟机上，如果需要，我可以申请将其配置为更高的规格。但我不清楚运行典型的 Discourse 实例所需的推荐配置是什么。

有人能提供这些配置要求吗？

上述问题假设升级失败仅仅是由于主机资源不足所致。

---

<div class="post-metadata">

**Author:** ![Systmyz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/systmyz/32/157841_2.png) [@Systmyz](https://meta.discourse.org/u/Systmyz)\
**Post date:** [2020年一月18日 13:24 UTC](https://meta.discourse.org/t/waiting-for-unicorn-to-reload-then-update-stops/101533/30 "2020-01-18T13:24:36Z")

</div>

需要帮助，升级 docker\_manager 时出错  
` 抱歉，升级 Discourse 时出错。请检查以下日志。`  
这是相同的错误  
`正在启动最初停止的 1 个 Unicorn 工作进程`  
**远程版本** 为：`2c89085`  
我有“重置升级”的选项，我应该这样做吗？恳请协助。提前感谢！！

---

<div class="post-metadata">

**Author:** ![willemb2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/willemb2/32/91608_2.png) [@willemb2](https://meta.discourse.org/u/willemb2)\
**Post date:** [2020年一月22日 12:22 UTC](https://meta.discourse.org/t/waiting-for-unicorn-to-reload-then-update-stops/101533/31 "2020-01-22T12:22:41Z")

</div>

我只是报告一下，我首次遇到此问题是在通过 Web UI 升级到 v2.4.0.beta10 +1（“docker\_manager 2c89085 已是最新版本”）时。如果有人需要我的日志，请参阅附件：[Discourse2.4beta10error.txt](https://meta.discourse.org/uploads/short-url/e0AzgbKIysKsAVMRurxcCzthFdB.txt)（10.2 KB）。

./launcher rebuild app 命令执行正常。

该问题出现在我家庭自托管的测试系统上。硬件配置为 Intel Atom D525 1.8 GHz 双核/四线程，4 GB 内存，搭配 SSD，运行 Lubuntu 16.04 LTS 系统。仅运行 Docker 和 Discourse，未执行其他任务。

---

<div class="post-metadata">

**Author:** ![karussell](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/karussell/32/79339_2.png) [@karussell](https://meta.discourse.org/u/karussell)\
**Post date:** [2021年六月20日 16:18 UTC](https://meta.discourse.org/t/waiting-for-unicorn-to-reload-then-update-stops/101533/32 "2021-06-20T16:18:24Z")

</div>

这个问题在我尝试更新到 2.7.4 时突然出现了。

我尝试通过命令行重新构建，但遇到了以下错误（在运行 discourse-doctor 之后）：

```plaintext
FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake themes:update assets:precompile' failed with return #<Process::Status: pid 4115 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:112:in `spawn'
exec failed with the params {"cd"=>"$home", "hook"=>"assets_precompile", "cmd"=>["su discourse -c 'bundle exec rake themes:update assets:precompile'"]}
5b36313b3f2b9e2173d52f8a7519d6aba3c4a975182d80150776d9c83659c351
**FAILED TO BOOTSTRAP** please scroll up and look for earlier error messages, there may be more than one.
./discourse-doctor may help diagnose the problem.
==================== END REBUILD LOG ====================
Failed to rebuild app.

```

奇怪的是，新版本 2.7.4 已经显示出来了，但当我尝试更新一个主题组件时，却收到错误：“about.json contains invalid values: Maximum discourse version is invalid”（about.json 包含无效值：最大 Discourse 版本无效）。

有人有什么建议，能让 Discourse 恢复到正常状态吗？

[上一頁](https://meta.discourse.org/t/waiting-for-unicorn-to-reload-then-update-stops/101533.md?page=1)
