A default SWAP space for micro instance is not available. So, you have to set up a swap space for your micro instance to avoid crashes. Micro instances have only 613MB of memory, so MySQL might crash quite often. Setting up a swap space can provide better performance.
Follow the below steps to create a swap space for your micro instance. First, create an AWS account and run a Micro instance to start with.
Follow these steps to create a swap space for your running micros instance. First, create an AWS account and run a micro instance to begin with.
Run dd if=/dev/zero of=/swapfile bs=1M count=1024
Run mkswap /swapfile
Run swapon /swapfile
Add this line /swapfile swap swap defaults 0 0 to /etc/fstab
If you want to automatically enable swap file after every reboot, then you can do the fourth step.
Few commands related to SWAP space:
$ swapon -s
$ free -k
$ swapoff -a
$ swapon -a