【问题标题】:Cherokee causing problems spawning multiple uwsgi instances切诺基导致产生多个 uwsgi 实例的问题
【发布时间】:2011-03-16 07:53:53
【问题描述】:

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

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

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

我已经发布了 cherokee.error 日志here

看来 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.

总的来说,问题是:

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

谷歌搜索 probably another instance of uWSGI is running on the same address 只匹配 uwsgi 源代码,所以看来我是唯一遇到这种情况的人。

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

有什么想法吗?

软件版本:

  • uWSGI 0.9.6.2
  • 切诺基 1.2.1
  • Django 开发主干(介于 1.3 rc 和 1.3 之间)

【问题讨论】:

    标签: python django cherokee uwsgi


    【解决方案1】:

    看起来这是一个在后备箱中修复的切诺基错误:

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

    我从 SVN 下载了中继,我不再遇到问题。

    【讨论】:

    • 这是从 cherokee 1.2.2 开始修复的
    猜你喜欢
    • 2023-03-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-07-16
    • 2020-07-20
    相关资源
    最近更新 更多