Linux VPS using up all available RAM
Hi there,
I've got a vps online and I'm using apache + lighttpd for two websites on the internet. The problem is that apache seems to be using all the ram on the server which is 512MB. The websites don't really have millions of visitors so I'm wondering if it maybe because of a misconfiguration issue in apache ? I don't know but with not many users it looks weird to me that apache is using so much ram. Can anybody give me a hand with this ? Thanks :) |
Can you provide some detailed RAM usage info?
To be honest with only 512MiB RAM I'm not totally surprised. You haven't mentioned which distro it is - some are configured to be much more RAM hungry than others by default and it's possible you have other system services running that you've no need for sitting in the background hogging extra space. If apache really is using all that RAM then I would definitely start looking at your apache config - but also what else you may be using. Any PHP code? What's php been told about memory usage? etc. |
Please provide the output of:
Code:
free -m |
Thanks for the reply guys :)
The system is debian and here is a copy paste from top: Quote:
Quote:
It seems that there were many users making request to apache at the same time and that's why it used all the ram, and it's not the first time, how can I fix this so it doesn't happen again, maybe with apache ? |
More RAM and/or swap is my recommendation if your existing RAM is not sufficient to handle peak traffic. 512mb is on the small side, in my opinion.
That being said the data you posted above shows you have 435mb free. For help interpreting these numbers: http://linuxatemyram.com |
in the previous message I meant that maybe it could be fixed with iptables ? (not with apache xD)
What happened could be considered more like a DoS attack than a peak really. |
All times are GMT -5. The time now is 07:38 PM. |