0

I'm running a python script to scrapping a page in my EC2 server using screen linux though a SSH connection. My EC2 account is the free tier offered by them.

Every time I try to run another script (same script but a different page being scrapped) the SSH server becomes slow and both scripts fails to run. I already tried tmux instead of screen but nothing changes. What should I do to solve it? Is it possible this to be a problem in Amazon, actually?

1 Answer 1

1

Try to add a swapfile

I had the similar problem, and adding a swapfile 1 GB has solved the case

E.g., if you have Ubuntu 18.04, you could try the following:

sudo fallocate -l 1G /swapfile sudo dd if=/dev/zero of=/swapfile bs=1024 count=1048576 sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile sudo echo "/swapfile swap swap defaults 0 0" >> /etc/fstab 

Source: https://linuxize.com/post/how-to-add-swap-space-on-ubuntu-18-04/

2
  • Welcome to Server Fault! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Commented Jan 14, 2020 at 13:59
  • Fixed, thanks (I really thought that the link is enough to avoid of using extra space) Commented Jan 14, 2020 at 14:06

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.