php build failed, can I safely restart httpd?

netra

New member
Joined
Aug 19, 2013
Messages
2
I was trying to install APC using custombuild (as per http://help.directadmin.com/item.php?id=400), but when I got to ...
Code:
./build php n
... the machine ran out of memory:
Code:
virtual memory exhausted: Cannot allocate memory

I'm on a VPS, so simply plugging in some RAM isn't an option for me. I tried a bunch of stuff to get the thing to compile, but to no avail.

Module installation difficulties aside, the thing I really want to know is: did I mess anything up that will prevent me from restarting httpd or the entire server? Is it safe to restart httpd now, or do I have to complete a php build first? As you can tell, I'm kind of new to DA/Custombuild... Anyway, since build failed, I expect it won't have committed anything, but I don't want to risk (temporarily) killing the machine.

Many thanks in advance!
 
If you have problems with apache restart, you may try "./build rewrite_confs" afterwards.
 
How much memory does your vps even have? You might need to pay for more memory if you dont even have enough to compile software.
 
But it seems that, at least in cb 2.0, it requires more memory then before. I have a Xen VPS with 1GB RAM (it is a idle server only used for one of my name servers), it has never been any trouble recompiling php or anything else, but recently I was no longer able to recompile PHP and Apache. I actually had to upgrade to 2GB RAM, wich I currently is running. So it seems, that custombuild 2.0 needs more free memory then before, and that 1GB is not enough.

Here are some of the error I got when I tried to recompile PHP in CB 2.0 on a VPS with 1GB RAM:

First attempt give me this:
Code:
virtual memory exhausted: Cannot allocate memory
mkdir: cannot create directory `ext/gd/libgd/.libs': File exists
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
make: *** Waiting for unfinished jobs....
[root@server custombuild]#

Second attempt gave me this:
Code:
cc: Internal error: Killed (program cc1)
Please submit a full bug report.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make: *** [ext/fileinfo/libmagic/apprentice.lo] Error 1
make: *** Waiting for unfinished jobs....
[root@server custombuild]#

And here is free -m from that time (today I have 2GB on that server):
Code:
[root@server custombuild]# free -m
 total used free shared buffers cached
Mem: 987 211 776 0 3 73
-/+ buffers/cache: 134 853
Swap: 255 150 105
[root@server custombuild]#
 
Last edited:
Thanks for the replies!

I have 1280 Megs on the VPS, which I thought was more than enough for a compilation... It should be.
From what I could see I think I'm running cb 1.1, not 2.0.

But:
./build rewrite_confs did it for me. :)
I had read about it, but didn't dare try it until I knew what it was gonna do.
Turns out that while I was sleeping my server started sending me "oh no, httpd is down!" messages, so that wasn't a fun wake-up for me this morning. I might try re-running ./build php d, since that seems to not run out of memory so fast. It still did yesterday, but the involuntary httpd restart freed up some memory and I now have almost 1000M free. Still, ./build php n failed pretty soon.
 
Back
Top