Issue
I use shell or vps from google cloud, and every time I want to run a process in this shelll when I exit the process in the shell also stops or dies.
I have used the SCREEN
and TMUX
commands, when I get out of the shell for 20 minutes the process shuts down by itself.
can I get the solution from the masters?
Solution
To answer shortly to your question: it's not possible.
With more detail, you need to understand what is Cloud Shell: it's a micro VM that google start freely for you. You have a quota per week and the VM is restarted at least every 12h
Non-interactive usage: Cloud Shell is intended for interactive use only. Non-interactive sessions will be ended automatically after a warning. Note that Cloud Shell sessions are capped at 12 hours, after which sessions are automatically terminated. You can use a new session immediately after.
When you aren't in interaction with the Cloud Shell console, it stops automatically after 20 minutes. Why? To save resource and save money (on Google side), because you don't pay this computing resource.
You have more detail on Cloud Shell environment limitations in the documentation
Anyway, if you want to run a batch job, on a small VM like Cloud Shell, you can use the Free tier compute engine instance for this. (choose correctly the region, else you will pay!)
Answered By - guillaume blaquiere Answer Checked By - Marie Seifert (WPSolving Admin)