django - uWSGI Segmentation Fault 阻止 Web 服务器运行
问题描述
我目前正在通过两个容器运行 Web 服务器:
- NGINX 容器:服务 HTTPS 请求并将 HTTP 重定向到 HTTPS。HTTPS 请求通过 uwsgi 传递到 django 应用程序。
- Django Container:运行必要的 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 证书已正确设置。
解决方案
django3 容器在 python:3.9-alpine 映像上运行。这会在容器上安装 Python 3.9.2。在这个版本上,uWSGI 和 Python 依赖项之间似乎存在一些问题。将容器回滚到 python:3.8-alpine 解决了依赖版本不匹配的问题。
推荐阅读
- php - 当我更改时区时,Symfony 控制器不需要的输出
- css - webapp 在移动屏幕上渲染太小
- python - 带有排除项的 Pandas 左外连接
- java - 里亚克。RiakClient 的 MultiDelete 不抛出异常
- node.js - 通过 Axios Ajax Call 和 VueJs 使用 Passportjs Local 进行身份验证
- javascript - 将数据插入引导模式元素
- swift - 使用属性文本设置 setContentOffset
- powershell - 如何从 powershell 脚本中执行“dotnet build”
- ubuntu - 在 Ubuntu 中为 gnu gcc 编译器配置的搜索路径中找不到编译器可执行文件
- c++ - 在 OpenCV 中使用 PCA 进行降维,特征向量的维数错误