When your swapfile is to tiny, you can easily exend the size of it. Here is the procedure for RedHat and CentOS.
free -m
dd if=/dev/zero of=/swapfile bs=1M count=8192
mkswap /swapfile
chown root:root /swapfile
chmod 0600 /swapfile
swapon /swapfile
vi /etc/fstab
/swapfile swap swap defaults 0 0
free -m
Visits: 138