easyapache memory build error

manuxer

Active Member
Aug 16, 2006
30
0
156
Hi,
I'm trying to user easyapache for updating apache to 2.2, but i get this error:

Easy::Apache v3.2.0 Build 2566
!! There was a problem allocating memory! Could only allocate 71 Megabytes of memory. Easyapache will fail to build because the system does not have enough free Memory. Aborting. !!


CENTOS Enterprise 4.5 x86_64 on standard - WHM X v3.1.0
and the last version of cpanel : WHM 11.11.0 cPanel 11.15.0-R17665

i restarted the server, i verified the memori usage, and i've got enough. but the error message remain the same.
 

cPanelNick

Administrator
Staff member
Mar 9, 2015
3,488
35
158
cPanel Access Level
DataCenter Provider
Hi,
I'm trying to user easyapache for updating apache to 2.2, but i get this error:

Easy::Apache v3.2.0 Build 2566
!! There was a problem allocating memory! Could only allocate 71 Megabytes of memory. Easyapache will fail to build because the system does not have enough free Memory. Aborting. !!


CENTOS Enterprise 4.5 x86_64 on standard - WHM X v3.1.0
and the last version of cpanel : WHM 11.11.0 cPanel 11.15.0-R17665

i restarted the server, i verified the memori usage, and i've got enough. but the error message remain the same.
Try building from a shell using /scripts/easyapache. You should be able to shave off a few megs by not using whm.
 

manuxer

Active Member
Aug 16, 2006
30
0
156
Try building from a shell using /scripts/easyapache. You should be able to shave off a few megs by not using whm.
Thank you cpanelnick, that way it worked.
 

AlexV.

Well-Known Member
Jun 15, 2006
212
1
168
johnchan:

Are you still getting memory issues even when running it via the command line?

/scripts/easyapache
 

johnchan

Active Member
Jun 29, 2003
40
0
156
We are getting the exact same error :

!! There was a problem allocating memory! Could only allocate 71 Megabytes of memory. Easyapache will fail to build because the system does not have enough free Memory. Aborting. !!

on numerous servers. They all report the same 71 Megabytes of memory problem on all the servers when running via the web interface.

This must be a common problem, and there must be a 71 Mb limit being placed somewhere... in httpd.conf? In php.ini? Somewhere else? Where can we raise this limit? It is highly unlikely all the servers we run all simultaneously lack exactly 71 Mb of RAM?!!
 

johnchan

Active Member
Jun 29, 2003
40
0
156
As an update to this, running it from the shell:

# /scripts/easyapache
!! Pre allocation testing was successfully able to allocate 90MB !!
!!
Ouput from '/bin/sh -c "ulimit -a"':
core file size (blocks, -c) 1000000
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 4096
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 14335
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
!!



It would appear that whatever process is calling the Easyapache from within the web interface perhaps has a ulimit on the amount of memory it is allowed to use, and thus is being limited from running Easyapache.

The solution would therefore be to either raise the ulimit for the process that launches Easyapache within the web interface, or reduce the RAM usage of Easyapache (probably not the solution).

Please update us, many people are having this issue.
 

cPDan

cPanel Staff
Staff member
Mar 9, 2004
716
8
243
If the memory test can't allocate 90 MB (IE apparently only 71 is available on your boxes for some reason) then there simply isn't enough memory.

Yes, WHM is a server so it already has memory used so the build process will have less to use so its more likley you'll get that error when running ea3 from WHM and not CLI.

The reason that test is run and subsequent error is output is in an attempt to keep the kernel from killign it in the middle of the process leaving you with a half built apache setup.

If it happens dudirng CLI also then your server needs more memory available.
 

johnchan

Active Member
Jun 29, 2003
40
0
156
If the memory test can't allocate 90 MB (IE apparently only 71 is available on your boxes for some reason) then there simply isn't enough memory.

Yes, WHM is a server so it already has memory used so the build process will have less to use so its more likley you'll get that error when running ea3 from WHM and not CLI.

The reason that test is run and subsequent error is output is in an attempt to keep the kernel from killign it in the middle of the process leaving you with a half built apache setup.

If it happens dudirng CLI also then your server needs more memory available.

It runs fine in the CLI/shell.

Actually, we found a way to workaround Easyapache's problem. In "Tweak Settings" there is an option to:

============
The maximum memory a cPanel process can use before it is killed off (in megabytes). Values less than 128 megabytes can not be specified.:
============

The default we had there was 128M. Doubling it to 256M as a workaround allows Easyapache to run within the web interface.

We have experimented with quite a few items, and this appears to be the one. Cpanel itself is limiting Easyapache from running, modifying the Tweak Settings default above allows Easyapache to run.

You probably want to inform your coders to make an exception for Easyapache or something, or otherwise change the default to something like 512M to ensure Easyapache can run smoothly.
 

cPDan

cPanel Staff
Staff member
Mar 9, 2004
716
8
243
It runs fine in the CLI/shell.

Actually, we found a way to workaround Easyapache's problem. In "Tweak Settings" there is an option to:

============
The maximum memory a cPanel process can use before it is killed off (in megabytes). Values less than 128 megabytes can not be specified.:
============

The default we had there was 128M. Doubling it to 256M as a workaround allows Easyapache to run within the web interface.

We have experimented with quite a few items, and this appears to be the one. Cpanel itself is limiting Easyapache from running, modifying the Tweak Settings default above allows Easyapache to run.

You probably want to inform your coders to make an exception for Easyapache or something, or otherwise change the default to something like 512M to ensure Easyapache can run smoothly.
You have to allow it enough memory to run. Thats what the error is for (its not a "problem" its a circumstance) and raising the limit is the proper way to respond to the message (its not a "workaround" its a proper way to handle the circumstance).

Good work!
 

johnchan

Active Member
Jun 29, 2003
40
0
156
You have to allow it enough memory to run. Thats what the error is for (its not a "problem" its a circumstance) and raising the limit is the proper way to respond to the message (its not a "workaround" its a proper way to handle the circumstance).

Good work!
Thanks!

But keep in mind the default in Tweak Settings is 128M memory limit (or at least it is for all the installs we have, which is over 20 servers).

This means Easyapache can never run on the default Cpanel installation with 128M memory limit for processes, because it is obviously needing at least 256M (or it might be somewhere between 128 to 256M but we don't want to waste time finding the exact number, the Cpanel developers probably already know the exact required number like 192M or something).

I suggest changing the Cpanel default to a minimum that will allow Easyapache to run. Having the default so small that Easyapache can never run, IMHO, is a bug, not a feature :p
 

cPDan

cPanel Staff
Staff member
Mar 9, 2004
716
8
243
Thanks!

But keep in mind the default in Tweak Settings is 128M memory limit (or at least it is for all the installs we have, which is over 20 servers).

This means Easyapache can never run on the default Cpanel installation with 128M memory limit for processes, because it is obviously needing at least 256M (or it might be somewhere between 128 to 256M but we don't want to waste time finding the exact number, the Cpanel developers probably already know the exact required number like 192M or something).

I suggest changing the Cpanel default to a minimum that will allow Easyapache to run. Having the default so small that Easyapache can never run, IMHO, is a bug, not a feature :p
The default is 256.
 

johnchan

Active Member
Jun 29, 2003
40
0
156
The default is 256.
Odd, all our's are 128. Note none are fresh installed in the past week, most have been up for a long time (prior to v11). You might want to make the minimum 256M then to allow Easyapache to run.
 

Symmetry

Registered
Dec 8, 2007
2
0
51
Still having problems on a 512 MB-box. I compile by CLI and this is some output

Ouput from '/bin/sh -c "ulimit -a"':
core file size (blocks, -c) 524288
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
pending signals (-i) 1024
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) 524288
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 106496
virtual memory (kbytes, -v) 524288
file locks (-x) unlimited

===============

In the end:

cc1: out of memory allocating 64680508 bytes after a total of 3264512 bytes
make: *** [ext/date/lib/parse_date.lo] Error 1
!! 'make' failed with exit code '512' !!
 

Symmetry

Registered
Dec 8, 2007
2
0
51
Limiting the virtual memory to a little more then 100MB solved the problem:

ulimit -v 120000
 

Website Rob

Well-Known Member
Mar 23, 2002
1,504
1
318
Alberta, Canada
cPanel Access Level
Root Administrator
Originally Posted by johnchan

But keep in mind the default in Tweak Settings is 128M memory limit (or at least it is for all the installs we have, which is over 20 servers).
The default is 256.
Incorrect Dan.

Previous Servers setup and our last Server setup in April of this year, all show a default value of 128. Tree doesn't matter either. Perhaps a future update could include raising the Servers with the old default (128) to the new (256)?