【问题标题】:uWSGI Segmentation Fault Prevents Web Server RunninguWSGI Segmentation Fault 阻止 Web 服务器运行
【发布时间】:2021-03-21 07:48:18
【问题描述】:

我目前正在通过两个容器运行 Web 服务器:

  • NGINX 容器:服务 HTTPS 请求并将 HTTP 重定向到 HTTPS。 HTTPS 请求通过 uwsgi 传递到 django 应用程序。
  • Django 容器:运行必要的 Django 代码。

在运行docker-compose up --build 时,一切都会正确编译,直到 uWSGI 引发分段错误。

....
django3_1  | Python main interpreter initialized at 0x7fd7bce0d190
django3_1  | python threads support enabled
django3_1  | your server socket listen backlog is limited to 100 connections
django3_1  | your mercy for graceful operations on workers is 60 seconds
django3_1  | mapped 145840 bytes (142 KB) for 1 cores
django3_1  | *** Operational MODE: single process ***
django3_1  | !!! uWSGI process 7 got Segmentation Fault !!!
test_django3_1 exited with code 1

如果有任何建议,我将不胜感激,因为在启动时我无法查看容器以进行调试,因此我不知道此分段错误发生在哪里。

SSL 证书已正确设置。

【问题讨论】:

    标签: django docker docker-compose uwsgi wsgi


    【解决方案1】:

    django3 容器在 python:3.9-alpine 映像上运行。这会在容器上安装 Python 3.9.2。在这个版本上,uWSGI 和 Python 依赖项之间似乎存在一些问题。将容器回滚到 python:3.8-alpine 解决了依赖版本不匹配问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-03-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-05
      相关资源
      最近更新 更多