I have a debian VPS with 2 GB RAM which is really good for handling big stuff. Recently, however, my website goes down often and I still can't target the exact reason.
At first I had 512MB RAM which was really too small to handle my website. As I saw in the logs, the site used at least 450MB. I upgraded it to 2GB hoping that would solve everything, but it hasn't done anything.
Then I thought it might be that my website code was running a huge process, because it actually was. So I rebuilt a simple system to reduce the huge process that was being done. Still, the same problem persisted.
Now I'm thinking it might be a number of visitors problem. But there aren't even 30 active visitors, even less, and 2 GB of RAM should good to handle them all. After looking at the RAM usage when the site goes down, it's about 400-500MB of the 2GB, so to me that confirmed it's not the RAM's problem.
So I'm really confused now. What else could it be?
Apache error logs are all about my PHP files notices and un-important stuff that has nothing to do with taking the Apache down, but I'm sure its only an Apache problem because SSH connects and works perfectly while the website is down.
What are expected problems or anything else to check? Could it be an Apache limitations for visitor usage?