Linux.com

Home Linux Community Forums New to Linux Getting Started with Linux apache make httpd cannot allocate memory

apache make httpd cannot allocate memory

Link to this post 08 Jan 12

I was doing the build step for apache http server, and I kept getting this error saying something could not allocate memory. I did some searching, and I didn't exactly find an answer, but it seems that the problem may have been that my server just didn't have enough memory to execute the make in one go. So I kept on trying, and that seems to have worked (still working on the apache installation).

My question is: do you think the lack of memory was really the problem here? I just setup this virtual dedicated linux server with godaddy. It's the smallest version, economy, but it says it has 1GB of RAM, so I'm surprised.

Link to this post 08 Jan 12

I do not believe this has to do with the amount of RAM, maybe it could be a lack of hard drive space. Without the exact error message we cannot figure out what the true cause was.

Link to this post 08 Jan 12

It may have run out of memory. With 1GB of RAM for your virtual machine, how much swap space has been allocated?

Link to this post 09 Jan 12

Looks like you run out of ram.

Compiling software takes much more ram than just using it ;) (usually at least)

Regards

Link to this post 09 Jan 12

@mfilpot, yeah, I should have written it down. I believe it was an malloc out of memory exception. It didn't really say much else than that. I'm guessing that I have somewhat less than 20GB of free space; that's how much comes with the plan, and I haven't installed anything except for apache.

@Rubberman, not sure how much swap space is allocated. I'll check tonight.

@marc, is that so? It could see compiles requiring a lot of memory to hold all the definitions and trees.

FYI, the installation was successful - happy!

Link to this post 15 Jan 12

FYI, my swap space appears to be 0 bytes. As I understand it, swap space sort of extends the actual amount of RAM that can be used, and so here I have 0. This implies that my system was attempting to allocate more than 1GB of RAM.

Is there a log file I can check to see how much RAM the system was attempting to allocate at the time that I was running this build?

Here is the /proc/meminfo snapshot.

MemTotal: 1048576 kB
MemFree: 976056 kB
Buffers: 0 kB
Cached: 0 kB
SwapCached: 0 kB
Active: 0 kB
Inactive: 0 kB
HighTotal: 0 kB
HighFree: 0 kB
LowTotal: 1048576 kB
LowFree: 976056 kB
SwapTotal: 0 kB
SwapFree: 0 kB
Dirty: 0 kB
Writeback: 0 kB
AnonPages: 0 kB
Mapped: 0 kB
Slab: 0 kB
PageTables: 0 kB
NFS_Unstable: 0 kB
Bounce: 0 kB
CommitLimit: 0 kB
Committed_AS: 0 kB
VmallocTotal: 0 kB
VmallocUsed: 0 kB
VmallocChunk: 0 kB
HugePages_Total: 0
HugePages_Free: 0
HugePages_Rsvd: 0
Hugepagesize: 2048 kB

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board