mkniskanen
Verified User
Note: I decided to post this one anew as there were no comments to it previously. I am currently having a severe headache with CB and seriously considering moving the services on the server to a clean, non-DA, non-CB one. I stress that a year ago I installed the server from scratch using the DA installation method and made no changes to the settings. So this is a clean DA/CB2 server.
The REMI repository, for instance, offers a good selection of ready-made RPMs for PHP installations for CentOS, including the most important extensions. Why not use that repo as an option for CentOS users?
Okay, now for the problems.
#1) 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 when 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.
Yes, it is the PHP build phase but there is more to it: The "build all" seems to consume more memory than a separate build.
#2) When building PHP separately seems to work (but only at the second or third build attempt) and after that I get a bunch of open_basedir errors:
Moreover, after that the installer gets stuck in install-pear and has to be killed using ctrl-c:
I do not think I have made any changes to PHP configuration(s) - it has been Custombuild 2 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). If there is no alternative to reduce build phase memory consumption then there are two options: #1) an option to use a repository or #2) clearly inform DA users about the minimum memory needed which I believe is somewhere around 2 GB.
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.
The REMI repository, for instance, offers a good selection of ready-made RPMs for PHP installations for CentOS, including the most important extensions. Why not use that repo as an option for CentOS users?
Okay, now for the problems.
#1) 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 when 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.
Yes, it is the PHP build phase but there is more to it: The "build all" seems to consume more memory than a separate build.
#2) When building PHP separately seems to work (but only at the second or third build attempt) and 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 2 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). If there is no alternative to reduce build phase memory consumption then there are two options: #1) an option to use a repository or #2) clearly inform DA users about the minimum memory needed which I believe is somewhere around 2 GB.
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.