【发布时间】:2016-04-02 22:27:07
【问题描述】:
首先:我正在使用 Apache/2.2.31 (Unix) 和带有 WSGI 的 Django 1.8 开发 Web 服务器。
一切都很好,直到我对 views.py 文件进行了一些更改并触摸了 wsgi.py 以使更改生效。之后,每次我尝试使用浏览器访问我域上的任何页面时,它都会返回以下消息:
服务暂时不可用
由于以下原因,服务器暂时无法处理您的请求 维护停机时间或容量问题。请稍后再试。
此外,503 Service Temporarily Unavailable 错误是 尝试使用 ErrorDocument 处理 请求。
我的 Apache 的 error_log 有以下条目:
[Mon Dec 28 23:06:02 2015] [error] [client xx.xx.xx.xx] (11)Resource temporarily unavailable: mod_wsgi (pid=24172): Unable to connect to WSGI daemon process 'name_of_my_project' on '/route/to/apache/log/wsgi.1922.18.1.sock' after multiple attempts as listener backlog limit was exceeded., referer: http://myproject.com/
[Mon Dec 28 23:06:17 2015] [error] [client xx.xx.xx.xx] (11)Resource temporarily unavailable: mod_wsgi (pid=24172): Unable to connect to WSGI daemon process 'name_of_my_project' on '/route/to/apache/log/wsgi.1922.18.1.sock' after multiple attempts as listener backlog limit was exceeded., referer: http://myproject.com/
[Mon Dec 28 23:16:02 2015] [error] [client xx.xx.xx.xx] (11)Resource temporarily unavailable: mod_wsgi (pid=28572): Unable to connect to WSGI daemon process 'name_of_my_project' on '/route/to/apache/log/wsgi.1922.18.1.sock' after multiple attempts as listener backlog limit was exceeded.
[Mon Dec 28 23:16:17 2015] [error] [client xx.xx.xx.xx] (11)Resource temporarily unavailable: mod_wsgi (pid=28572): Unable to connect to WSGI daemon process 'name_of_my_project' on '/route/to/apache/log/wsgi.1922.18.1.sock' after multiple attempts as listener backlog limit was exceeded.
我整天都在寻找解决方案,我发现了这个:https://groups.google.com/forum/#!topic/modwsgi/H7qPoqYNJdI
还有这个悬而未决的问题:https://stackoverflow.com/questions/33549891/mod-wsgi-returning-503-service-unavailable
但我不知道如何解决它。请帮帮我。
【问题讨论】:
-
有趣。我总是重新启动 Apache 以应用更改,并且从未遇到过问题。发布您的 Apache/virtualhost wsgi 设置可能会有所帮助。
标签: python django apache mod-wsgi http-status-code-503