# 在90% Plus时发生带等待状态的锁定

**URL:** https://meta.discourse.org/t/lockup-with-wait-state-at-90-plus/155840
**Category:** Support
**Created:** [2020年六月24日 17:18 UTC](https://meta.discourse.org/t/lockup-with-wait-state-at-90-plus/155840 "2020-06-24T17:18:26Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![tisawyer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tisawyer/32/127435_2.png) [@tisawyer](https://meta.discourse.org/u/tisawyer)
#### Post date: [2020年六月24日 17:18 UTC](https://meta.discourse.org/t/lockup-with-wait-state-at-90-plus/155840/1 "2020-06-24T17:18:26Z")

</div>

我的 Discourse 出现卡死现象，CPU 的等待状态（top 中的 wa:）达到 90% 或更高。其他管理员是否遇到过导致此问题的常见原因？我使用的是运行在 AWS 上的 Debian。

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [2020年六月24日 17:36 UTC](https://meta.discourse.org/t/lockup-with-wait-state-at-90-plus/155840/2 "2020-06-24T17:36:11Z")

</div>

数据库是在 RDS 中，还是与 Web 服务位于同一个容器中？

机器磁盘是 EBS 网络挂载吗？您是否检查过是否超出了允许的 IOPS 限制？

---

<div class="post-metadata">

### Author: ![tisawyer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tisawyer/32/127435_2.png) [@tisawyer](https://meta.discourse.org/u/tisawyer)
#### Post date: [2020年六月25日 22:58 UTC](https://meta.discourse.org/t/lockup-with-wait-state-at-90-plus/155840/3 "2020-06-25T22:58:49Z")

</div>

数据库位于同一个 Docker 容器中。为我搭建此环境的人创建了两个 EBS 卷，一个为 8GiB，另一个为 32GiB。卷类型均为 GP2。两个卷的 IOPS 均为 100。这个 IOPS 是否足够？我正在阅读 [https://aws.amazon.com/premiumsupport/knowledge-center/optimize-ebs-provisioned-iops/](https://aws.amazon.com/premiumsupport/knowledge-center/optimize-ebs-provisioned-iops/) 进行学习，但任何能指引我正确方向的提示都将不胜感激。

编辑：我发现队列长度（上述文章中提到的指标）在 19 日的最近一次中断期间变得非常长（见下图）。现在的问题是，如何找出导致这一现象的原因，以及如何预防？

 ![Screen Shot 2020-06-25 at 7.24.38 PM](https://global.discourse-cdn.com/meta/original/3X/9/0/9031a06edd166417e2b5739ed31b5246fa249af8.png)
