django - Openshift 应用程序没有响应

标签 django openshift connection-timeout

我有一个正在进行中的 django 应用程序托管在 openshift 上,在过去几天的某个时间点,它在浏览器中完全停止响应。

我仍然可以通过 ssh 进入它,我可以部署到它,并且 openshift.redhat.com 界面没有报告应用程序的任何错误,但是通过浏览器请求任何页面都没有给出任何响应。浏览器一直显示“正在等待 appname-user.rhcloud.com”。

日志可能会提供一些见解。

rhc tail appname
==> app-root/logs/python.log <==
Unable to open logs
(98)Address already in use: make_sock: could not bind to address 127.8.172.129:8080
no listening sockets available, shutting down
Unable to open logs
(98)Address already in use: make_sock: could not bind to address 127.8.172.129:8080
no listening sockets available, shutting down
Unable to open logs
... (ad infinitum)

我不认为它在部署后停止响应,它在工作,然后就没有了。不知道发生了什么。

对于可能导致此问题的原因或如何调试/解决它的任何想法,我们将不胜感激。


编辑

根据 fat fantasma 的建议,我尝试了强制停止/启动循环,这是记录的内容:

$ rhc app force-stop -a notebook
$ rhc app start -a notebook

$ rhc tail notebook
==> app-root/logs/python.log <==
(98)Address already in use: make_sock: could not bind to address 127.8.172.129:8080
no listening sockets available, shutting down
Unable to open logs
(98)Address already in use: make_sock: could not bind to address 127.8.172.129:8080
no listening sockets available, shutting down
Unable to open logs
[Sun Nov 16 01:26:13 2014] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:openshift_t:s0:c4,c359
[Sun Nov 16 01:26:13 2014] [notice] Digest: generating secret for digest authentication ...
[Sun Nov 16 01:26:13 2014] [notice] Digest: done
[Sun Nov 16 01:26:13 2014] [notice] Apache/2.2.15 (Unix) mod_wsgi/3.4 Python/2.7.5 configured -- resuming normal operations

==> app-root/logs/postgresql.log <==
2014-11-16 06:26:05 GMT LOG:  trying another address for the statistics collector
2014-11-16 06:26:05 GMT LOG:  could not bind socket for statistics collector: Cannot assign requested address
2014-11-16 06:26:05 GMT LOG:  disabling statistics collector for lack of working socket
2014-11-16 06:26:05 GMT WARNING:  autovacuum not started because of misconfiguration
2014-11-16 06:26:05 GMT HINT:  Enable the "track_counts" option.
2014-11-16 06:26:06 GMT LOG:  database system was interrupted; last known up at 2014-11-15 07:33:35 GMT
2014-11-16 06:26:06 GMT LOG:  database system was not properly shut down; automatic recovery in progress
2014-11-16 06:26:06 GMT LOG:  record with zero length at 0/1D48850
2014-11-16 06:26:06 GMT LOG:  redo is not required
2014-11-16 06:26:06 GMT LOG:  database system is ready to accept connections

我可能是错的,但我仍然觉得这个应用程序很好,它可能与 DNS 相关。我尝试了我的应用程序 URL ( http://notebook-davur.rhcloud.com) 的 DNS 跟踪,跟踪以这个金 block 结尾:

Sending request to "ns3.p23.dynect.net" (208.78.71.23)
Received authoritative (AA) response:
-> Header: Non-Existent Domain

最佳答案

以“rhc app-force-stop”开始。然后重新启动它。然后再次崩溃时查看日志。

关于django - Openshift 应用程序没有响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26943269/

相关文章:

node.js - 如何在 OpenShift Gear 中升级 Node.js

python - pip install 在 OpenShift 中失败,错误信息为 Permission Denied

java - 如何在 MySQL JDBC 驱动程序上设置连接超时?

java - Hibernate/MySQL 连接超时——尝试处理退出后不释放 Hibernate 连接到 C3P0 的线程池执行程序

python - Django mptt数据库迁移报错

python - django 管理员 : how to make a readonly url field clickable in change_form. html?

javascript - Django 欧芹 : uncaught error

openshift - Openshift 中的 set-env PATH

android - 改造2/OKHttp3 : set custom per-request headers programatically

python - (Django) 如何让用户 FK 注册用户名而不是代码 (int)