PHP update 7.3.x fails the make virtual memory exhausted at apprentice.lo error

ikkeben

Verified User
Joined
May 22, 2014
Messages
1,553
Location
Netherlands Germany
For those who have such with only 2GB (test) real memory and clamd activ.

After error
PHP update 7.3.x fails the make virtual memory exhausted ad apprentice.lo error
Code:
/bin/sh /usr/local/directadmin/custombuild/php-7.3.25/libtool --silent --preserve-dup-deps --mode=compile cc -I/usr/local/directadmin/custombuild/php-7.3.25/ext/fileinfo/libmagic -Iext/fileinfo/ -I/usr/local/directadmin/custombuild/php-7.3.25/ext/fileinfo/ -DPHP_ATOM_INC -I/usr/local/directadmin/custombuild/php-7.3.25/include -I/usr/local/directadmin/custombuild/php-7.3.25/main -I/usr/local/directadmin/custombuild/php-7.3.25 -I/usr/local/directadmin/custombuild/php-7.3.25/ext/date/lib -I/usr/local/include/libxml2 -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/include/libpng16 -I/usr/local/icu/include -I/usr/local/directadmin/custombuild/php-7.3.25/ext/mbstring/oniguruma -I/usr/local/directadmin/custombuild/php-7.3.25/ext/mbstring/libmbfl -I/usr/local/directadmin/custombuild/php-7.3.25/ext/mbstring/libmbfl/mbfl -I/usr/local/directadmin/custombuild/php-7.3.25/ext/sqlite3/libsqlite -I/usr/local/directadmin/custombuild/php-7.3.25/ext/zip/lib -I/usr/local/directadmin/custombuild/php-7.3.25/TSRM -I/usr/local/directadmin/custombuild/php-7.3.25/Zend    -I/usr/local/include -g -O2 -fvisibility=hidden -DZEND_SIGNALS   -c /usr/local/directadmin/custombuild/php-7.3.25/ext/fileinfo/libmagic/apprentice.c -o ext/fileinfo/libmagic/apprentice.lo
virtual memory exhausted: Cannot allocate memory
make: *** [Makefile:966: ext/fileinfo/libmagic/apprentice.lo] Error 1

I did checked the swap file 4096
And stopped clamd service before again updating ( had to push after longer time twice the stop button for that in DA admin GUI.

This solved the issue BUT:

Is it possible to have memory space checked before pushing update?
While system hangs / reboots it seems then and not reachable for some time with such problem.

So if doing updates and low memory do stop if using clamd service before updating that helps. ;)
 
Last edited:
I'd suggest adding 1GB swapfile or so, it might solve your problems.
 
I think he missed this
I never use much more than 2 gigs


What is
Code:
sysctl vm.swappiness

If you used tuned what is
Code:
tuned-adm active
Code:
sysctl vm.swappiness
30
If you used tuned what is
Code:
tuned-adm active
Virtual guest

Was only with that update sofar. But solved now, i don't know or it was coïncendence with some...

I suspect i did the updates manually one after one, so one was maybe not 100 percent ready with some work after restarted some of those services.
 
Last edited:
If you have KVM host you want
virtual-host
which is
Code:
tuned-adm profile virtual-host
check
Code:
sysctl vm.swappiness
if it's still 30
use
Code:
echo 10 > /proc/sys/vm/swappiness

That should improve things

if it openvz what you have is correct.
you can still do
check
Code:
sysctl vm.swappiness
if it's still 30
use
Code:
echo 10 > /proc/sys/vm/swappiness
 
If you have KVM host you want
virtual-host
which is
Code:
tuned-adm profile virtual-host
check
Code:
sysctl vm.swappiness
if it's still 30
use
Code:
echo 10 > /proc/sys/vm/swappiness

That should improve things

if it openvz what you have is correct.
you can still do
check
Code:
sysctl vm.swappiness
if it's still 30
use
Code:
echo 10 > /proc/sys/vm/swappiness
NOOP Openstack instance.

CentOS 8 installed myself when not supported, or first supported a bit. by DA but not the Openstack hoster and images... ;)

But with fast SSD then with only 2GB in testing... 30 or even 60 should work ok normally

Oyea why Openstack i can make fast images/snapshots for testing and changes, also save them on shelve or even disk images, and be back with same ip's ( (handy for fast (geo) dns stuff external and so) in very short times if something not working as wanted.
Even apply extra mem or CPU on hour base or so. ( if instance is used for things that are seasonal then very handy also)

The Openstack enviroment total itself is redundant. and so more nice things.

Why DA on it , hmm because i know a bit , more then only clean centos ... i have to learn some more no time now.
 
Last edited:
Back
Top