Build Problems

NiggsNetwork

New member
Joined
Apr 30, 2010
Messages
3
I keep getting the following error when I try to do ./build all d

Code:
/usr/local/directadmin/custombuild/php-5.2.13/libtool: fork: Cannot allocate memory
/usr/local/directadmin/custombuild/php-5.2.13/libtool: fork: Cannot allocate memory
/usr/local/directadmin/custombuild/php-5.2.13/libtool: fork: Cannot allocate memory
make: *** [ext/curl/streams.lo] Error 128
make: *** Waiting for unfinished jobs....

cc1: out of memory allocating 32776 bytes after a total of 113102848 bytes
virtual memory exhausted: Cannot allocate memory
make: *** [ext/curl/interface.lo] Error 1
make: *** [ext/date/lib/parse_date.lo] Error 1
 
@NiggsNetwork:

If you're on a VPS contact your VPS provider. If you're running a VPS under xen you may need a larger swap directory or to create a swap file.

If you're running a dedicated server you may need to create a swap directory or swap file.

Beware that using swap can slow down your system by quite a bit.

Jeff
 
AWS / DirectAdmin / PHP Upgrade / php 5.5 to php 5.6.31

If you encounter this issue on AWS, try increasing the instance size.
I tried this on a t2.nano instance and increased to t2.small and the installation completed successfully.

This was done with DirectAdmin installed.
Upgrade from php 5.5 to php5.6.31

Hope this helps.
 
I can confirm the same problem. The q&d way of running "build all d" will simply not work.

I have 1 GB real memory and 512 MB swap (a KVM VPS) so in total that is 1.5 GB. While opening another terminal and watching the memory usage with "top" I can see that the memory consumption grows wehen compiling PHP. When starting the build there is more than 700 MB free memory but at some point during the PHP7 build phase the amount of consumed memory gets very high and the compiler crashes due to insufficient memory.

When building PHP separately seems to work (but only at the second or third build attempt) but after that I get a bunch of open_basedir errors:

Code:
Installing PEAR environment:      /usr/local/php71/lib/php/
PHP Warning:  realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (./) in phar:///usr/local/directadmin/custombuild/php-7.1.11/pear/install-pear-nozlib.phar/System.php on line 483
PHP Warning:  realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (./) in phar:///usr/local/directadmin/custombuild/php-7.1.11/pear/install-pear-nozlib.phar/System.php on line 483
PHP Warning:  realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (./) in phar:///usr/local/directadmin/custombuild/php-7.1.11/pear/install-pear-nozlib.phar/System.php on line 483
PHP Warning:  is_executable(): open_basedir restriction in effect. File(/usr/local/bin/gpg) is not within the allowed path(s): (./) in phar:///usr/local/directadmin/custombuild/php-7.1.11/pear/install-pear-nozlib.phar/System.php on line 530
PHP Warning:  is_executable(): open_basedir restriction in effect. File(/sbin/gpg) is not within the allowed path(s): (./) in phar:///usr/local/directadmin/custombuild/php-7.1.11/pear/install-pear-nozlib.phar/System.php on line 530
PHP Warning:  is_executable(): open_basedir restriction in effect. File(/bin/gpg) is not within the allowed path(s): (./) in phar:///usr/local/directadmin/custombuild/php-7.1.11/pear/install-pear-nozlib.phar/System.php on line 530
PHP Warning:  is_executable(): open_basedir restriction in effect. File(/usr/sbin/gpg) is not within the allowed path(s): (./) in phar:///usr/local/directadmin/custombuild/php-7.1.11/pear/install-pear-nozlib.phar/System.php on line 530
PHP Warning:  is_executable(): open_basedir restriction in effect. File(/usr/bin/gpg) is not within the allowed path(s): (./) in phar:///usr/local/directadmin/custombuild/php-7.1.11/pear/install-pear-nozlib.phar/System.php on line 530
PHP Warning:  file_exists(): open_basedir restriction in effect. File(/root/.pearrc) is not within the allowed path(s): (./) in phar:///usr/local/directadmin/custombuild/php-7.1.11/pear/install-pear-nozlib.phar/PEAR/Config.php on line 653
PHP Warning:  realpath(): open_basedir restriction in effect. File(/tmp) is not within the allowed path(s): (./) in phar:///usr/local/directadmin/custombuild/php-7.1.11/pear/install-pear-nozlib.phar/System.php on line 483

Moreover, after that the installer gets stuck in install-pear and has to be killed using ctrl-c:

Code:
PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
28391 root      20   0  212312  33360   7336 R  99.3  3.3  10:25.12 php

I do not think I have made any changes to PHP configuration(s) - it has been Custombuild from day zero to avoid any problems. Currently, however, CB gives me more headache than ever before. Every time there is a need to upgrade PHP, for instance, it has to be done in the early hours of a Sunday morning and after crashes I must check carefully if there is anything that has been left out.

As for adding more memory I cannot justify doubling or quadrupling my server cost by increasing the memory to 2GB or 4GB because the web stuff on the server runs happily in less than 256 MB (tested 128 MB without problems).

I really, really wish there was an option to use the simple yum update for PHP, at least.

Edit: After the Ctrl-C above and a PHP-fpm restart the server has been running correctly. I cannot help but wonder why Custombuild is using PHP for modifying files in system directories when there are other options (bash, perl) that could do it without problems.
 
Last edited:
Back
Top