[英]How to increase the AWS lambda to lambda connection timeout or keep the connection alive?
[英]How to let the python script (abc.py) keep executing on AWS even after Connection lost or SSH connection is terminated?
我在 AWS AMI 上使用Jupyter notebook
,並使用PuTTY
在 Windows 上使用端口轉發。 我的連接被終止了,現在 24 小時的所有工作都丟失了,我無法得到它。 所以我使用了一個腳本而不是筆記本,同樣的事情發生了。 我曾經認為即使Shell連接丟失,該過程也會繼續進行。 但是下次我登錄時,我什么也看不到。 我使用top
和htop
aux
來查找我的進程是否仍在運行,但它們沒有顯示我的進程。 請幫助我如何阻止這種情況發生。
我在 10 上使用 Windows,在本地使用Putty
,在 AWS AMI 上使用Ubuntu 18
。
你可以試試
nohup python3 myscript.py &
試試 tmux
apt install tmux
我經常用它來保持我的web在服務器上運行(不專業但方便)
你可以使用屏幕。
你可以安裝它:
sudo apt install screen
您可以在這里找到更多信息: https://linuxize.com/post/how-to-use-linux-screen/
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.