Cherokee 导致产生多个 uwsgi 实例的问题

发布于 2024-10-22 02:08:59 字数 1358 浏览 3 评论 0原文

我正在运行 cherokee 来使用 uwsgi 为 django 应用程序提供服务。自从升级到 cherokee 1.2.x 以来,我一直有一些奇怪的行为。

在 cherokee 1.2.x 之前的设置工作正常,我没有更改任何配置。

问题是,现在,当 uwsgi 未运行并且我尝试加载 django 应用程序站点时,我首先收到 503 错误。后续请求工作正常。查看日志,我发现 cherokee 正在生成多个 uwsgi 实例,这似乎是问题所在。

我已经在此处发布了 cherokee.error 日志

看来 cherokee 正在生成多个 uwsgi 实例:

probably another instance of uWSGI is running on the same address.

我的 uwsgi 配置是:

<pidfile>/home/my_home/my_project/uwsgi.pid</pidfile>
<vacuum />
<processes>4</processes>
<harakiri>30</harakiri>
<master />

该问题的另一个症状是,在 503 以及随后的 uwsgi 成功启动之后,我没有 PID 文件。这是因为 uwsgi 的其他实例启动后失败,并在退出时删除 PID 文件:

binding on TCP port: 45611
probably another instance of uWSGI is running on the same address.
bind(): Address already in use [socket.c line 341]
VACUUM: pidfile removed.

因此,总体而言,问题是:

  • cherokee 启动 uwsgi 后,第一个视图上显示 503
  • 没有创建 PID 文件(或者更确切地说,它正在创建,但立即被另一个退出的 uwsgi 进程删除)

谷歌搜索可能是 uWSGI 的另一个实例正在同一地址上运行仅与 uwsgi 源代码匹配,所以看来我是只有一个人经历过这一点。

我在具有相同设置的多台计算机上遇到了同样的问题。

有什么想法吗?

软件版本:

  • uWSGI 0.9.6.2
  • Cherokee 1.2.1
  • Django开发主干(1.3 rc和1.3之间)

I am running cherokee to serve a django app using uwsgi. I have been having some strange behavior since upgrading to cherokee 1.2.x.

The setup worked fine prior to cherokee 1.2.x and I haven't changed any of my configuration.

The problem is that now, when uwsgi is not running and I try to load the django app site, I first get a 503 error. Subsequent requests work fine. Looking at the logs I see that cherokee is spawning multiple uwsgi instances and this seems to be the problem.

I have posted the cherokee.error log here

It appears that cherokee is spawning multiple uwsgi instances:

probably another instance of uWSGI is running on the same address.

My configs for uwsgi are:

<pidfile>/home/my_home/my_project/uwsgi.pid</pidfile>
<vacuum />
<processes>4</processes>
<harakiri>30</harakiri>
<master />

Another symptom of the problem is that after the 503 and then subsequent successful start of uwsgi, I don't have a PID file. This is because the additional instances of uwsgi that get started and then fail delete the PID file when they exit:

binding on TCP port: 45611
probably another instance of uWSGI is running on the same address.
bind(): Address already in use [socket.c line 341]
VACUUM: pidfile removed.

So overall, the issues are:

  • 503 is displayed on first view after uwsgi is started by cherokee
  • No PID file is being created (or rather it's being created but immediately being deleted by another exiting uwsgi process)

A google search for probably another instance of uWSGI is running on the same address only matches against the uwsgi source code, so it seems I'm the only one experiencing this.

I experience this same issue on multiple computers with the same setup.

Any ideas?

Versions of software:

  • uWSGI 0.9.6.2
  • Cherokee 1.2.1
  • Django development trunk (between 1.3 rc and 1.3)

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

罪歌 2024-10-29 02:08:59

看起来这是一个在主干中修复的切诺基错误:

http://svn.cherokee-project.com/listing.php?repname=Cherokee&peg=6382&rev=6380

我从 SVN 下载了 trunk,并且不再遇到该问题。

Looks like this is a cherokee bug fixed in trunk:

http://svn.cherokee-project.com/listing.php?repname=Cherokee&peg=6382&rev=6380

I downloaded trunk from SVN and I am no longer experiencing the problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文