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?

Rafael
  • 1

1 Answers1

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/