gpt4 book ai didi

nginx - Gunicorn CPU 使用率增加到非常高的值

转载 作者:行者123 更新时间:2023-12-03 23:17:37 30 4
gpt4 key购买 nike

我们正在使用 Gunicorn 和 Nginx。每次重启 gunicorn 后,Gunicorn 占用的 CPU 使用率会逐渐增加。这在 3-4 天内从 0.5% 增加到 85% 左右。在重新启动 gunicorn 时,它下降到 0.5%。
请提出可能导致此问题的原因以及如何继续调试和解决此问题。

最佳答案

  • 检查工作人员配置。尝试使用以下方法:cores * 2 -1
  • 检查您的应用程序,似乎您的应用程序正在阻塞/卡住线程。为所有 api 调用、数据库查询等添加超时
  • 您可以添加 APM 软件来分析您的应用程序,例如 datadog。
  • 关于nginx - Gunicorn CPU 使用率增加到非常高的值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47070509/

    30 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com