Console Session closes by itself get reload or close message

  • Posted on August 3, 2023
  • Vijay1748252834554092a284b73c4Asked by VKD

I am running a Python script that uses NLP libraries, pre-trained models, and a machine-learning model to perform tasks like scraping articles, paraphrasing titles, summarizing descriptions, etc. Whenever I run the script after 15 to 20 minds the console just restarts and I have run the script again and it is still the same. What could be the issue?

Also, I am looking at running this script automatically every day without an active console, is it possible?

I am running it on 8GB RAM, 160GB droplet VM server.

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Bobby Iliev
Site Moderator
Site Moderator badge
August 3, 2023

Hi there,

I could suggest using an SSH client rather than the web console. This will be more reliable.

Also, what you could do is use screen to run your command in so that even if your SSH session drops the command would still continue running.

Here is a step by step tutorial on how to do that:

How to keep a process running even after closing SSH connection?

But the main commands are:

  • Once you have screen installed, to start a new screen session run:

This would spin up a new screen and you would be attached to it automatically, inside the screen session run your script.

After that to detach from the screen session press CTRL+a+d.

If you need to attach back to the screen session run and check on your process just run:


If you’ve forgotten the name of your screen session or if you’ve not set a name, you could list all available screen sessions by running:

screen -ls

Let me know how it goes!



Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Featured on Community

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel