Add extra swap to linux server
If every server had plenty of RAM in the real world that does not happen. If for some reason you have a server with too little SWAP or you are hitting the max of the swap. Here is a quick way to add 1GB swap to the server.
dd if=/dev/zero of=/usr/swapfilesys bs=1024 count=1024000 mkswap /usr/swapfilesys swapon /usr/swapfilesys swapon -s
Now add the following to the /etc/fstab and you are done.
/usr/swapfilesys swap swap defaults 0 0