【问题标题】:SSH Connection disconnectedSSH 连接断开
【发布时间】:2016-08-26 22:16:00
【问题描述】:

我是韩国学生

首先,对不起我的英语水平低:)

我正在使用 AWS + nginx + django 制作网络服务

我使用 SSH 协议连接到 AWS 实例(ubuntu)

Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 3.13.0-74-generic x86_64)

 * Documentation:  https://help.ubuntu.com/

 System information as of Sat Apr 30 07:03:51 UTC 2016

 System load:  0.0               Processes:           105
 Usage of /:   23.8% of 7.74GB   Users logged in:     0
 Memory usage: 14%               IP address for eth0: 172.31.17.137
 Swap usage:   0%

 Graph this data and manage this system at:
    https://landscape.canonical.com/

 Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

21 packages can be updated.
17 updates are security updates.


Last login: Sat Apr 30 07:03:52 2016 from 210.103.124.253
pyenv-virtualenv: no virtualenv has been activated.

manage.py runserver --settings=abc.settings.production

所以每个人都可以访问我的网络服务!

但是.... 30 分钟后

SSL 连接自行中断.... 导出这条消息

packet_write_wait: Connection to 52.69.xxx.xxx: Broken pipe

没有人可以访问我的网络服务...

所以...当我的计算机关闭时,我的网站无法访问,没有 SSL 连接...

我希望每个人都可以 24/7 访问我的网络服务

请给我一个方法谢谢:)

【问题讨论】:

  • 您是否尝试使用nohup (nohup manage.py runserver --settings=abc.settings.production &) 启动您的服务器?这将确保即使您的会话断开,该过程也会继续。
  • 我的命令是(python manage.py runserver --settings=abc.settings.production)你的方法是(nohup python manage.py runserver --settings=abc.settings.production)?? @JuliePelletier
  • 谢谢!!朱莉佩尔蒂埃!!你解决了我的问题!!!

标签: django amazon-web-services nginx ssh


【解决方案1】:

如果您想运行在当前 shell 终止后继续运行的命令,您应该使用 nohup 命令来启动它。

这会导致进程与其初始父 shell 分离,因此当父进程终止时它不会被终止。

【讨论】:

    猜你喜欢
    • 2017-01-06
    • 2021-07-15
    • 2021-09-25
    • 1970-01-01
    • 2022-10-24
    • 2015-05-02
    • 2017-10-05
    • 2016-02-22
    • 2021-07-16
    相关资源
    最近更新 更多