Just a suggestion: it might be an idea to set up swap as that may alleviate future issues.
Once the system runs out of RAM and has no-where else to store it, it has to dump stuff. This can lead to the system locking up, depending on what processes are affected.
One example of setting up swap:
… although, personally, I prefer to set up a swap partition.