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.
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!
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.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
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:
But the main commands are:
screen
installed, to start a newscreen
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 availablescreen
sessions by running:Let me know how it goes!
Best,
Bobby