【发布时间】:2015-06-20 12:55:43
【问题描述】:
我的应用程序在使用 mod_wsgi、Flask 和 Python 2.7 的 Apache 2 服务器上运行。奇怪的是,当页面刷新时应用程序崩溃了。对我来说,这恰好发生在其他每次刷新时。你可以看到它here。此外,在 Chrome 中,如果我打开网络检查器工具,程序确实不会崩溃。
在日志中,我看到:
[Tue Apr 14 13:45:29.137444 2015] [wsgi:error] [pid 32713] [client 146.203.54.32:58816] Truncated or oversized response headers received from daemon process 'localhost:80': /etc/g2e/htdocs/g2e
[Tue Apr 14 13:45:29.671493 2015] [core:notice] [pid 28845] AH00052: child pid 640 exit signal Segmentation fault (11)
[Tue Apr 14 13:45:29.671520 2015] [wsgi:info] [pid 28845] mod_wsgi (pid=640): Process 'localhost:80' has died, deregister and restart it.
[Tue Apr 14 13:45:29.671524 2015] [wsgi:info] [pid 28845] mod_wsgi (pid=640): Process 'localhost:80' terminated by signal 11
[Tue Apr 14 13:45:29.671527 2015] [wsgi:info] [pid 28845] mod_wsgi (pid=640): Process 'localhost:80' has been deregistered and will no longer be monitored.
...
FWIW,我正在使用
Linux 3.16.7-7-desktop #1 SMP PREEMPT Wed Dec 17 18:00:44 UTC 2014 (762f27a) x86_64 x86_64 x86_64 GNU/Linux
感谢任何帮助。
【问题讨论】:
-
关于 mod_wsgi 邮件列表的讨论是groups.google.com/forum/#!topic/modwsgi/JdSAnqoJDTw
-
我认为回答我的问题不公平,因为我自己没有正确解决问题。但是 FWIW,我无法使用 Graham 的建议解决问题,并且由于服务器已经投入生产,我担心摆弄太多。我最终使用 Docker 并安装了 Apache、mod_wsgi 等。
标签: apache flask apache2 mod-wsgi