The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

easyapache memory build error

Discussion in 'EasyApache' started by manuxer, Oct 13, 2007.

  1. manuxer

    manuxer Active Member

    Joined:
    Aug 16, 2006
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  2. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Try building from a shell using /scripts/easyapache. You should be able to shave off a few megs by not using whm.
     
  3. manuxer

    manuxer Active Member

    Joined:
    Aug 16, 2006
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Thank you cpanelnick, that way it worked.
     
  4. AlexV.

    AlexV. Well-Known Member

    Joined:
    Jun 15, 2006
    Messages:
    212
    Likes Received:
    1
    Trophy Points:
    16
    johnchan:

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

    /scripts/easyapache
     
  5. johnchan

    johnchan Active Member

    Joined:
    Jun 29, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    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?!!
     
  6. johnchan

    johnchan Active Member

    Joined:
    Jun 29, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  7. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    4
    Trophy Points:
    18
    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.
     
  8. johnchan

    johnchan Active Member

    Joined:
    Jun 29, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6

    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.
     
  9. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    4
    Trophy Points:
    18
    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!
     
  10. johnchan

    johnchan Active Member

    Joined:
    Jun 29, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    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
     
  11. cPDan

    cPDan cPanel Staff
    Staff Member

    Joined:
    Mar 9, 2004
    Messages:
    711
    Likes Received:
    4
    Trophy Points:
    18
    The default is 256.
     
  12. johnchan

    johnchan Active Member

    Joined:
    Jun 29, 2003
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  13. Symmetry

    Symmetry Registered

    Joined:
    Dec 8, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    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' !!
     
  14. Symmetry

    Symmetry Registered

    Joined:
    Dec 8, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Limiting the virtual memory to a little more then 100MB solved the problem:

    ulimit -v 120000
     
  15. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    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)?
     
  16. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,478
    Likes Received:
    203
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    From the changelog: http://changelog.cpanel.net/

    As of: Stable 18429 2007-12-13 13:50:04
     
Loading...

Share This Page