I set up a VPS on Amazon some days ago. I installed LAMP server and then uploaded some sites there. Everything was working fine until yesterday I noticed the sites showing database connection errors. I checked the error log in /var/log/mysql/ and it seems that there are some memory problems. You can see the last records from the error log here: https://paste.ubuntu.com/23533774/
I read somewhere that "Cannot allocate memory for the buffer pool" indicates that this is memory problem and a solution to it would be adding a swap file.
What I wanted to know is if I should increase memory ram for the VPS or if I should add this swap file. Or perhaps there's another solution I don't know about.
Additional info: - Memory Ram available now is 1GB - There's about 2 html sites, 2 wordpress sites, 1 joomla site and 3 other php sites. Possible couple more sites to be added. - This is the first time I set up a server
Thanks for the help in advance.