Welcome to the new Linux Foundation Forum!
apache make httpd cannot allocate memory
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.
0
Comments
Compiling software takes much more ram than just using it
Regards
@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!
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
Regards
Call it whatever you want, swapme was a fast name that I used to test the steps.
@mfillpot - thanks, swapon is what I tried at first and it failed. I searched about the error and hit that godaddy support thread that I posted. I still tried changing fstab and rebooting, but doesn't appear to have done anything.
As for the swapon command, can you please paste the error message or tell us what it does when that command fails?
can you please tell me the steps and errors messages that resulted when you followed by script? I am curious about the naming conventions you use and to verify that your instructions are all pointing to the same source.
Regards
I'm looking up the util-linux package to learn what to do,but I have a question that I hope would save me some unnecessarily lost time.
On my server, I have util-linux-ng.i686 rpm package installed (it shows up in yum list installed; it came that way on the machine). So I think I ought to uninstall that package (yum remove), then compile and install the new util-linux (from https://github.com/karelzak/util-linux?) - correct?
The util-linux-ng package is a standard package, installed by default on RHEL 6.x and clones. Your server indicates that. Don't bother, unless there is something that you really need from the one you are proposing to install.
At the moment, I'm working on getting my machine back to normal, but in the mean time, is there an option or prompt for yum remove that I missed? Also, I suspect many programs may be expecting a certain version of the util-linux files, and therefore fail, but this I'm really uncertain of.
Unfortunately there is no quick fix for this except to reinstall the OS. You can install all the removed packages manually, but that will take a LOT longer than a simple reinstall/repair. Some installers will let you repair the installation, re-installing the default package set without munging current configurations of other stuff in /etc for example. In any case, you will have a lot of work to do to get back to where you were.
My recommendation in such cases is not to uninstall the package in question, but to install it in /usr (the default --prefix option for source packages is /usr/local, normally). If that causes problems, then you can fix that with a simple "yum reinstall util-linux" command. That will restore the default system version of those applications and such.