Django应用程序:Gunicorn Procfile-Max-Requests配置:定期工人 - 主持人会杀死在其中运行的任务(过程)吗?

发布于 2025-02-10 07:03:35 字数 253 浏览 1 评论 0原文

我一直在Django应用程序中面临内存泄漏,由于某种原因,我无法摆脱它们。在这里,我想尝试使用Gunicorn-Max-Requests配置,以定期重新启动Gunicorn工人以释放内存。

在将其用于生产之前,我在这里有一些担忧,

  1. 此定期重新启动会杀死其中的任何过程吗?
  2. 还是它会等待工人在重新启动之前闲置?

我假设基本哲学将在重新启动之前等待它闲置。但是我没有找到备份的文件。对此的任何见解都会有所帮助。

I have been facing memory leaks in my Django application and for some reason, I am not able to get rid of them. Here I wanted to try with Gunicorn --max-requests config to restart the gunicorn workers periodically to release the memory.

I had a few concerns here before taking it to production,

  1. Would this periodic restart kill any process running inside it?
  2. Or would it wait for the worker to be idle before restarting it?

I was assuming the basic philosophy will be wait it to be idle before restarting it. but I did not find documents backing this up. Any insights on this will be helpful.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文