# 加了几个插件以后重构一直失败

**URL:** <https://www.isharkfly.com/t/topic/16466>\
**Category:** Discourse\
**Tags:** discourse\
**Created:** [October 24, 2024, 10:39am UTC](https://www.isharkfly.com/t/topic/16466 "2024-10-24T10:39:27Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![CAKE\_NICE](https://www.isharkfly.com/user_avatar/www.isharkfly.com/cake_nice/32/14319_2.png) [@CAKE\_NICE](https://www.isharkfly.com/u/CAKE_NICE)\
**Post date:** [October 24, 2024, 10:39am UTC](https://www.isharkfly.com/t/topic/16466/1 "2024-10-24T10:39:27Z")

</div>

```auto
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/Lhcfl/user-auto-active.git
          - git clone https://github.com/Lhcfl/replace-translations-global.git
          - git clone https://github.com/discourse/discourse-microsoft-auth
          - git clone https://github.com/discourse/discourse-whos-online
# 以下是新添加的插件
          - git clone https://github.com/discourse/discourse-ai.git
          - git clone https://github.com/discourse/DiscoTOC.git
          - git clone https://github.com/discourse/discourse-cakeday.git
          - git clone https://github.com/discourse/discourse-doc-categories.git
          - git clone https://github.com/discourse/discourse-solved.git
          - git clone https://github.com/discourse/discourse-gamification.git
          - git clone https://github.com/discourse/discourse-encrypt.git
          - git clone https://github.com/discourse/discourse-tooltips.git
          - git clone https://github.com/discourse/discourse-category-experts.git
          - git clone https://github.com/discourse/discourse-data-explorer.git
          - git clone https://github.com/discourse/discourse-signatures.git
          - git clone https://github.com/discourse/discourse-reactions.git
          - git clone https://github.com/discourse/discourse-docs.git 

```

---

<div class="post-metadata">

**Author:** ![CAKE\_NICE](https://www.isharkfly.com/user_avatar/www.isharkfly.com/cake_nice/32/14319_2.png) [@CAKE\_NICE](https://www.isharkfly.com/u/CAKE_NICE)\
**Post date:** [October 24, 2024, 10:40am UTC](https://www.isharkfly.com/t/topic/16466/2 "2024-10-24T10:40:13Z")

</div>

GPT总结的日志，运行discourse-doctor

 ![image](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/2X/b/bd0b04dca22b0268e966b5044fc10e300db4ddff.png)

---

<div class="post-metadata">

**Author:** ![CAKE\_NICE](https://www.isharkfly.com/user_avatar/www.isharkfly.com/cake_nice/32/14319_2.png) [@CAKE\_NICE](https://www.isharkfly.com/u/CAKE_NICE)\
**Post date:** [October 24, 2024, 10:48am UTC](https://www.isharkfly.com/t/topic/16466/3 "2024-10-24T10:48:58Z")

</div>

```auto
undefined
 ERR_PNPM_RECURSIVE_EXEC_FIRST_FAIL Command was killed with SIGKILL (Forced termination): ember build -prod

107I, [2024-10-24T10:47:40.284598 #1] INFO -- : Terminating async processes
I, [2024-10-24T10:47:40.284636 #1] INFO -- : Sending INT to HOME=/var/lib/postgresql USER=postgres exec chpst -u postgres:postgres:ssl-cert -U postgres:postgres:ssl-cert /usr/lib/postgresql/13/bin/postmaster -D /etc/postgresql/13/main pid: 39
I, [2024-10-24T10:47:40.284865 #1] INFO -- : Sending TERM to exec chpst -u redis -U redis /usr/bin/redis-server /etc/redis/redis.conf pid: 107
:signal-handler (1729766860) Received SIGTERM scheduling shutdown...
2024-10-24 10:47:40.286 UTC [39] LOG: received fast shutdown request
2024-10-24 10:47:40.293 UTC [39] LOG: aborting any active transactions
2024-10-24 10:47:40.313 UTC [39] LOG: background worker "logical replication launcher" (PID 54) exited with exit code 1
2024-10-24 10:47:40.316 UTC [49] LOG: shutting down
107:M 24 Oct 2024 10:47:40.352 # User requested shutdown...
107:M 24 Oct 2024 10:47:40.352 * Saving the final RDB snapshot before exiting.
107:M 24 Oct 2024 10:47:40.382 * DB saved on disk
107:M 24 Oct 2024 10:47:40.382 # Redis is now ready to exit, bye bye...
2024-10-24 10:47:40.394 UTC [39] LOG: database system is shut down

FAILED
--------------------
Pups::ExecError: cd /var/www/discourse && su discourse -c 'bundle exec rake assets:precompile:build' failed with return #<Process::Status: pid 2286 exit 1>
Location of failure: /usr/local/lib/ruby/gems/3.3.0/gems/pups-1.2.1/lib/pups/exec_command.rb:132:in `spawn'
exec failed with the params {"cd"=>"$home", "tag"=>"build", "hook"=>"assets_precompile_build", "cmd"=>["su discourse -c 'bundle exec rake assets:precompile:build'"]}
bootstrap failed with exit code 1
**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.
8151308515a3f1b71abf57e06c5186832d4b69a3ae75bbf427462fde6559a700

```

---

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [October 24, 2024, 2:50pm UTC](https://www.isharkfly.com/t/topic/16466/4 "2024-10-24T14:50:17Z")

</div>

看你的新添加的插件都是官方的插件，理论上不会有什么问题。

那先把添加的插件从插件列表中删除，再重构下看看？

---

<div class="post-metadata">

**Author:** ![CAKE\_NICE](https://www.isharkfly.com/user_avatar/www.isharkfly.com/cake_nice/32/14319_2.png) [@CAKE\_NICE](https://www.isharkfly.com/u/CAKE_NICE)\
**Post date:** [October 24, 2024, 3:12pm UTC](https://www.isharkfly.com/t/topic/16466/5 "2024-10-24T15:12:14Z")

</div>

害 很奇怪 明天试试。

---

<div class="post-metadata">

**Author:** ![luobo](https://www.isharkfly.com/user_avatar/www.isharkfly.com/luobo/32/15604_2.png) [@luobo](https://www.isharkfly.com/u/luobo)\
**Post date:** [October 25, 2024, 1:28am UTC](https://www.isharkfly.com/t/topic/16466/6 "2024-10-25T01:28:27Z")

</div>

加入插件构建失败，大概率是网络问题，清除构建缓存之后再试试

> [@CAKE\_NICE](#):
>
> `git clone https://github.com/discourse/DiscoTOC.git`

我记得这个是主题组件吧，是要在主题组件哪里安装的。

---

<div class="post-metadata">

**Author:** ![VegaMonika](https://www.isharkfly.com/user_avatar/www.isharkfly.com/vegamonika/32/14424_2.png) [@VegaMonika](https://www.isharkfly.com/u/VegaMonika)\
**Post date:** [October 25, 2024, 2:43am UTC](https://www.isharkfly.com/t/topic/16466/7 "2024-10-25T02:43:55Z")

</div>

> [@CAKE\_NICE](#):
>
> [GitHub - discourse/DiscoTOC: A Discourse theme component that generates a table of contents for topics with one click](https://github.com/discourse/DiscoTOC.git)

你们居然都不写备注哇

 ![image](https://cdn.isharkfly.com/com-isharkfly-www/discourse-uploads/original/2X/1/11978ee6b4bb68556d508a3af83fa1f733537b98.png)

我每个都写了备注哪天要卸载不然要要找半天

---

<div class="post-metadata">

**Author:** ![honeymoose](https://www.isharkfly.com/user_avatar/www.isharkfly.com/honeymoose/32/20796_2.png) [@honeymoose](https://www.isharkfly.com/u/honeymoose)\
**Post date:** [October 25, 2024, 2:46am UTC](https://www.isharkfly.com/t/topic/16466/8 "2024-10-25T02:46:09Z")

</div>

> [@VegaMonika](#):
>
> 哪天要卸载

我只要是官方的插件，基本上就不卸载了。

对官方的内容还是比较信任的，只要他们还在维护的话。

---

<div class="post-metadata">

**Author:** ![CAKE\_NICE](https://www.isharkfly.com/user_avatar/www.isharkfly.com/cake_nice/32/14319_2.png) [@CAKE\_NICE](https://www.isharkfly.com/u/CAKE_NICE)\
**Post date:** [October 25, 2024, 11:03am UTC](https://www.isharkfly.com/t/topic/16466/9 "2024-10-25T11:03:05Z")

</div>

其实插件名字都看得出来是个啥

---

<div class="post-metadata">

**Author:** ![CAKE\_NICE](https://www.isharkfly.com/user_avatar/www.isharkfly.com/cake_nice/32/14319_2.png) [@CAKE\_NICE](https://www.isharkfly.com/u/CAKE_NICE)\
**Post date:** [October 25, 2024, 11:17am UTC](https://www.isharkfly.com/t/topic/16466/10 "2024-10-25T11:17:11Z")

</div>

我删掉了这个 最终还是不行

---

<div class="post-metadata">

**Author:** ![CAKE\_NICE](https://www.isharkfly.com/user_avatar/www.isharkfly.com/cake_nice/32/14319_2.png) [@CAKE\_NICE](https://www.isharkfly.com/u/CAKE_NICE)\
**Post date:** [October 25, 2024, 11:17am UTC](https://www.isharkfly.com/t/topic/16466/11 "2024-10-25T11:17:28Z")

</div>

删了确实可以正常重构。

* * *

等等删了刚刚又重构了一次还是不行。

* * *

加了2g swap 又可以了，现在继续重构，排除一下是不是swap问题。

---

<div class="post-metadata">

**Author:** ![luobo](https://www.isharkfly.com/user_avatar/www.isharkfly.com/luobo/32/15604_2.png) [@luobo](https://www.isharkfly.com/u/luobo)\
**Post date:** [October 27, 2024, 9:42am UTC](https://www.isharkfly.com/t/topic/16466/12 "2024-10-27T09:42:29Z")

</div>

我估计是交换分区不够的锅

---

<div class="post-metadata">

**Author:** ![CAKE\_NICE](https://www.isharkfly.com/user_avatar/www.isharkfly.com/cake_nice/32/14319_2.png) [@CAKE\_NICE](https://www.isharkfly.com/u/CAKE_NICE)\
**Post date:** [October 27, 2024, 12:02pm UTC](https://www.isharkfly.com/t/topic/16466/13 "2024-10-27T12:02:57Z")

</div>

确实，加了2g就行了

---

<div class="post-metadata">

**Author:** ![luobo](https://www.isharkfly.com/user_avatar/www.isharkfly.com/luobo/32/15604_2.png) [@luobo](https://www.isharkfly.com/u/luobo)\
**Post date:** [October 27, 2024, 12:15pm UTC](https://www.isharkfly.com/t/topic/16466/14 "2024-10-27T12:15:01Z")

</div>

他这个构建镜像的时候特别吃内存，我经常会内存不够构建失败

---

<div class="post-metadata">

**Author:** ![CAKE\_NICE](https://www.isharkfly.com/user_avatar/www.isharkfly.com/cake_nice/32/14319_2.png) [@CAKE\_NICE](https://www.isharkfly.com/u/CAKE_NICE)\
**Post date:** [October 27, 2024, 1:58pm UTC](https://www.isharkfly.com/t/topic/16466/15 "2024-10-27T13:58:45Z")

</div>

尤其是插件越来越多的时候
