# 最近几次更新中的内存缓慢增长问题

**URL:** <https://meta.discourse.org/t/memory-creep-in-last-couple-of-updates/117746>\
**Category:** Self-hosting\
**Tags:** hosting\
**Created:** [2019 年5 月 14 日 22:51 UTC](https://meta.discourse.org/t/memory-creep-in-last-couple-of-updates/117746 "2019-05-14T22:51:34Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![RBoy](https://avatars.discourse-cdn.com/v4/letter/r/2bfe46/32.png) [@RBoy](https://meta.discourse.org/u/RBoy)\
发布日期： [2019 年5 月 14 日 22:51 UTC](https://meta.discourse.org/t/memory-creep-in-last-couple-of-updates/117746/1 "2019-05-14T22:51:34Z")

</div>

在过去的几周里，我注意到系统内存使用率每天逐渐上升，最终达到满载。

历史上，内存使用率一直保持在 50% - 55%（在 3GB 内存的系统上）。但在更新后，内存使用率起初为 50%，随后在接下来几天内缓慢攀升至 85%，并开始使用交换空间（swap）。

是否有办法找出 Discourse 中是什么导致内存逐渐增加并占用内存？任务管理器仅显示 Ruby 进程缓慢增加其消耗的内存量。每个 Ruby 进程似乎都占用了 350MB 内存并持续增长。（更新后，它们初始占用低于 200MB）

我在两天前刚刚更新到 [v2.3.0.beta9 +392](https://github.com/discourse/discourse/compare/dafc941a04d183d98a8804deffee25d6a83900c7...tests-passed)，内存使用率已从 50% 上升到 75%，且似乎并未趋于稳定。

---

_[View the full topic](https://meta.discourse.org/t/memory-creep-in-last-couple-of-updates/117746)._
