# 排查一个本来非常快但突然变慢的网站

**URL:** <https://meta.discourse.org/t/troubleshooting-a-slow-site-that-was-pretty-zippy-until-this-morning/330019>\
**Category:** Product Support\
**Tags:** performance\
**Created:** [2024 年10 月 9 日 05:08 UTC](https://meta.discourse.org/t/troubleshooting-a-slow-site-that-was-pretty-zippy-until-this-morning/330019 "2024-10-09T05:08:11Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

作者： ![omarfilip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/omarfilip/32/208019_2.png) [@omarfilip](https://meta.discourse.org/u/omarfilip)\
发布日期： [2024 年10 月 9 日 05:08 UTC](https://meta.discourse.org/t/troubleshooting-a-slow-site-that-was-pretty-zippy-until-this-morning/330019/1 "2024-10-09T05:08:12Z")

</div>

如何着手排查一个网站（毫无征兆地）突然变慢的问题？

资源使用率非常低：

 ![Screenshot 2024-10-08 at 8.47.41 PM](https://global.discourse-cdn.com/meta/original/4X/7/d/e/7de5c19755c2b339286548700a06cc113712968f.png)  
这是一个 16 GB 内存 / 4 AMD vCPU / 200 GB 磁盘 / SFO3 - Ubuntu 24.04 (LTS) x64 droplet，磁盘使用率为 30%。

DigitalOcean [服务状态](https://status.digitalocean.com/) 全天正常。

用户在不同地点报告了网站变慢的问题。

yaml：  
`UNICORN_WORKERS: 8`  
`db_shared_buffers: "1024MB"`  
`db_work_mem: "40MB"`

我已经重建到最新版本，并为 Sidekiq 分配了更多内存 `UNICORN_SIDEKIQ_MAX_RSS: 1000`

控制台中出现一些 429 错误：

 ![Screenshot 2024-10-08 at 9.10.24 PM](https://global.discourse-cdn.com/meta/original/4X/d/0/7/d07c5e14912c91411f1be2aa5636c52c6561015b.png)  
 ![Screenshot 2024-10-08 at 9.23.31 PM](https://global.discourse-cdn.com/meta/original/4X/f/9/0/f909818c3925ecbd40e3c6f0fa3b0a7bf17b75f7.png)

过去 3 天的错误日志：

 ![Screenshot 2024-10-08 at 9.01.03 PM](https://global.discourse-cdn.com/meta/original/4X/3/d/4/3d4f26effdb7c0028d9eb10c1fad3d4946474576.png)

---

_[View the full topic](https://meta.discourse.org/t/troubleshooting-a-slow-site-that-was-pretty-zippy-until-this-morning/330019)._
