Memory Exhausted?
I'm on Fedora Core 2, Celeron 2.0GHz, 1g of ram, 120gb hd. My server has been down a lot lately. I contacted the hosting company, and they told me that I should allocate my memory. How do I do that? What do I do? I've been surfing and searching for solution but no luck. Can this problem be resolved by adding more ram? As of now, only thing i can do is restart the server everytime it happens.
Here is my error log. Quote:
Quote:
|
Yes, you need more memory.
You can either add more RAM, or, increase your swap partition from the current 2GB to, say 4GB (but this will obviously be slower than adding more RAM) |
Hmmm------if we don't know what is using the memory, then how would we know that we need more?????
I infer that the OP is running a server---doing what? My pea-brain think that servers move data between disk drives and users (clients). Is not RAM used more as a buffer to increase speed?? |
I think you've got an application memory leak. "20,971,520 bytes" ($0140000) is a peculiar memory limit -- not a magic number to me -- but not that large. Such a number does not imply, to me at least, that the system as a whole is out of RAM/swap.
|
I'd agree that one of the first questions to ask is what's using the RAM now? What does "top" show?
|
ok since this thread is about intuition and telepathy i'm going to guess you need to increase
php_value memory_limit 32M in .htaccess file that is set it to something -- larger could also set this with memory_limit = in php.ini |
All of the above. More information is required in order to understand the problem. The free -m was a good start. As pixellany and J.W. said, you need to find out what is using all that memory. As J.W. already said, you can use top in a terminal window to find this. Once top is running press the uppercase "M" key. This will sort the display by the amount of memory that each process is using.
It is also important to tell us the function of the server. Are you running a web server or a mail server or an ftp server? Are you running several server applications at once? If you are running a web server what software are you running, including version? Are you running the Linux, Apache, MySQL, Php combination? Is this machine doing a lot of database work? If yes are the databases large? If this is a more simple web server are you streaming large video files? How many connections to you normally have? How many connections do you find to be the peak workload? If you are running a mail server what software are you using? How many users does the mail server service? How large are the mail files/folders? There are different possibilities available to address each of these situations. It is clear that you have exhausted both physical RAM and your swap space. As tregedar said you may be able to address this either by adding a lot more swap space or adding a lot more RAM or both. My workstation has 1 GB physical RAM and I don't run a lot of applications simultaneously. Still I use all of my RAM and 13 MB of swap space. If a workstation under a light load will use that much memory then certainly a busy server will want more that 1 GB RAM and more than 1 GB of swap space. Anyway, if you decide to just go ahead and add RAM, swap space, or both, you may fix the problem or you may cover up a problem. Maybe the only real answer is to add RAM and swap space. On the other hand if you provide more information to this thread someone may be able to find a problem that can be addressed in another way. Good luck. :) |
^ Thank you guys for the supports. I was able to fix the problems. It was due to couples of reasons. I was able to open the error logs and went on from there.
Here's what i did. 1. increase the max clients in apache and mysql 2. add additional 1 gig of ram. |
You may have "fixed" it, or you may have simply delayed its return.
|
^ Ha ha. I dunno not. I may have delayed its return. ;) But i'm sure it'll stay fine for a while.
|
All times are GMT -5. The time now is 11:38 AM. |