# 重建时内存不足，即使有 4GB 交换空间？

**URL:** <https://meta.discourse.org/t/out-of-memory-on-rebuild-with-4gb-swap/392831>\
**Category:** Self-hosting\
**Created:** [2026年一月6日 23:41 UTC](https://meta.discourse.org/t/out-of-memory-on-rebuild-with-4gb-swap/392831 "2026-01-06T23:41:29Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Ethsim2](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ethsim2/32/522255_2.png) [@Ethsim2](https://meta.discourse.org/u/Ethsim2)\
**Post date:** [2026年一月7日 11:39 UTC](https://meta.discourse.org/t/out-of-memory-on-rebuild-with-4gb-swap/392831/5 "2026-01-07T11:39:45Z")

</div>

这看起来像是内存溢出（OOM）终止：我使用的是约 2 GiB 内存，在双容器重建中，旧应用和新构建的重叠将内存推过极限。在引导之前，交换空间（Swap）已经使用了约 3 GiB，因此 Ember 构建的峰值被发送了 SIGKILL 信号。停止正在运行的容器（或进行单容器重建）可以避免重叠并成功。下一步是通过 `dmesg` 确认，然后要么在重建前重启 / 调查是什么导致交换空间随时间推移而增加 / 增加内存（一旦交换空间已被大量使用，仅靠交换空间似乎无法挽救）。

---

_[View the full topic](https://meta.discourse.org/t/out-of-memory-on-rebuild-with-4gb-swap/392831)._
