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.

How do I fix this: (22)Invalid argument: setrlimit(RLIMIT_AS): failed to set memory u

Discussion in 'General Discussion' started by KatieBuller, Jun 30, 2005.

  1. KatieBuller

    KatieBuller BANNED

    Joined:
    May 10, 2005
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    0
    How do I fix this?
    (22)Invalid argument: setrlimit(RLIMIT_AS): failed to set memory usage limit
     
  2. webignition

    webignition Well-Known Member

    Joined:
    Jan 22, 2005
    Messages:
    1,880
    Likes Received:
    0
    Trophy Points:
    36
    What is it you are doing that causes this to occur?

    Where are you seeing this error?
     
  3. KatieBuller

    KatieBuller BANNED

    Joined:
    May 10, 2005
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    0
    I dont know what causes it, thats why I posted here.

    I found that in the error log.
     
  4. gpreston

    gpreston Well-Known Member

    Joined:
    Jan 31, 2004
    Messages:
    61
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    West Chester, PA
    which error log? What else was around it?
     
  5. adept2003

    adept2003 Well-Known Member

    Joined:
    Aug 11, 2003
    Messages:
    283
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    ~ "/(extra|special)/data"
    A suggested "fix" was posted here: http://forums.cpanel.net/showthread.php?t=28586&highlight=memory+limit

    However, that didn't work for me. This is how I fixed it:
    1. Log into WHM
    2. Click "Tweak Settings"
    3. Scroll to the bottom of the page and find the field which says "The maximum memory a cPanel process can use before it is killed off (in megabytes). Defaults to 128 megabytes if not specified.:"
    4. Chances are that the box is empty. Insert a value, eg 256.
    5. Save settings and Restart Apache.

    Thats it! Appears that rather than "Defaults to 128 megabytes if not specified" as it claims to do, it simply doesn't insert any value, hence the setrlimit RLIMIT AS (address space) error message in the log file.

    Not sure if this affects anyone else, so I haven't submitted a bug report - although it did affect 3 of my servers running cPanel 10.5.0-C49 following an apache rebuild.

    Incidently, what value have people used for the max memory in the above mentioned field? I've used 512, on a machine with 2GB ram... I'd be interested to know what other people would suggest?
     
  6. Bruce

    Bruce Well-Known Member

    Joined:
    Oct 4, 2001
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    Yep, we have it too after updating to Current 10.6.0.C-3
    It is loading up the Apache error logs

    Tried all the fixes above but nothing works.

    Thu Aug 18 21:25:13 2005] [error] (22)Invalid argument: setrlimit(RLIMIT_AS): failed to set memory usage limit
    [Thu Aug 18 21:25:18 2005] [error] (22)Invalid argument: setrlimit(RLIMIT_AS): failed to set memory usage limit
    [Thu Aug 18 21:25:18 2005] [error] (22)Invalid argument: setrlimit(RLIMIT_AS): failed to set memory usage limit
    [Thu Aug 18 21:25:25 2005] [error] (22)Invalid argument: setrlimit(RLIMIT_AS): failed to set memory usage limit
    [Thu Aug 18 21:25:28 2005] [error] (22)Invalid argument: setrlimit(RLIMIT_AS): failed to
     
  7. adept2003

    adept2003 Well-Known Member

    Joined:
    Aug 11, 2003
    Messages:
    283
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    ~ "/(extra|special)/data"
    Post the contents of your cpanel.config file, located here: /var/cpanel/cpanel.config
     
  8. Bruce

    Bruce Well-Known Member

    Joined:
    Oct 4, 2001
    Messages:
    147
    Likes Received:
    0
    Trophy Points:
    16
    #config ---------------------------------------=
    RS=default
    VALIASDIR=/etc/valiases
    VFILTERDIR=/etc/vfilters
    access_log=/usr/local/cpanel/logs/access_log
    adminuser=cpanel
    allowcpsslinstall=0
    allowparkonothers=0
    allowperlupdates=1
    allowremotedomains=0
    allowunregistereddomains=0
    alwaysredirecttossl=0
    awstatsbrowserupdate=0
    awstatsreversedns=0
    basename=cpanel
    blockcommondomains=1
    cpredirecthostname=0
    cycle=1
    defaultmailaction=fail
    disableipnscheck=1
    disablequotacache=0
    disablexfercpanel=0
    discardformmailbccsubject=1
    dnslookuponconnect=0
    docroot=/usr/local/cpanel/base
    dumplogs=0
    emailusersbandwidthexceed=1
    engine=cpanel
    enginepl=cpanel.pl
    engineroot=/usr/local/cpanel
    errorstostdout=0
    exim-retrytime=30
    eximmailtrap=1
    extracpus=5
    ftppasslogs=0
    ignoredepreciated=0
    interchangever=disable
    jaildefaultshell=1
    keepftplogs=0
    keeplogs=0
    keepstatslog=0
    loadthreshold=5
    logchmod=
    maxemailsperhour=0
    maxmem=256
    myname=cpaneld
    mysql-version=4.1
    mysqldebug=0
    nobodyspam=1
    nouserbackupwarn=0
    numacctlist=50
    phploader=sourceguardian
    phpopenbasedirhome=1
    popbeforesmtpsenders=0
    popchecktimes=0
    popfloodcheck=1
    port=2082
    product=cPanel
    resetpass=0
    root=/usr/local/cpanel
    showwhmbwusageinmegs=0
    skipanalog=1
    skipawstats=0
    skipboxcheck=0
    skipboxtrapper=0
    skipbwlimitcheck=0
    skipdiskcheck=0
    skipeximstats=0
    skipformmail=0
    skiphorde=0
    skiphttpauth=0
    skipmailman=0
    skipneomail=0
    skipparentcheck=0
    skipspamassassin=1
    skipspambox=0
    skipsqmail=0
    skipurchin=1
    skipwebalizer=0
    skipwhoisns=0
    stats_log=/usr/local/cpanel/logs/stats_log
    statsloglevel=1
    urchinsetpath=
    usemailformailmanurl=1
    usemysqloldpass=1
    userstatsoverride=1
    version=8.0
     
  9. adept2003

    adept2003 Well-Known Member

    Joined:
    Aug 11, 2003
    Messages:
    283
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    ~ "/(extra|special)/data"
    The "maxmem" value appears to be fine. Try changing it to another value (eg. 128) and then running /usr/local/cpanel/startup to make cpanel pickup the changes. Failing that, I'm afraid I have no idea.

    Good luck!
     
  10. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    If it concerns you, you should log a support ticket with cPanel and open a Bugzilla entry and refer to it in your ticket so that cPanel can investigate it on your server and develop a fix so that they are aware of the problem.

    Btw, the error appears in the main apache error log, which would suggest that it's being applied to the wrong apache config, since it is meant to only affect (AFAIK) the cPanel httpd occurence, not the main one.
     
  11. swampy

    swampy Well-Known Member

    Joined:
    Jan 30, 2004
    Messages:
    148
    Likes Received:
    0
    Trophy Points:
    0
    I have tried the above fix but this is still happening also I get an email informing me of this and the email is getting bigger each time I receive it at the last count the email was over 4mb and rising

    Thanks
    Swampy

    WHM 10.6.0 cPanel 10.6.0-R55
    CentOS 3.5 i686 - WHM X v3.1.0
     
  12. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider

    Did you restart httpd ?
     
  13. cPanelNick

    cPanelNick Administrator
    Staff Member

    Joined:
    Mar 9, 2015
    Messages:
    3,426
    Likes Received:
    2
    Trophy Points:
    38
    cPanel Access Level:
    DataCenter Provider
    Also what does ulimit -a show in a shell ?
     
  14. swampy

    swampy Well-Known Member

    Joined:
    Jan 30, 2004
    Messages:
    148
    Likes Received:
    0
    Trophy Points:
    0
    yes i restarted the httpd
     
  15. swampy

    swampy Well-Known Member

    Joined:
    Jan 30, 2004
    Messages:
    148
    Likes Received:
    0
    Trophy Points:
    0
    ulimit shows

    core file size (blocks, -c) 1000000
    data seg size (kbytes, -d) unlimited
    file size (blocks, -f) unlimited
    max locked memory (kbytes, -l) 4
    max memory size (kbytes, -m) unlimited
    open files (-n) 4096
    pipe size (512 bytes, -p) 8
    stack size (kbytes, -s) 8192
    cpu time (seconds, -t) unlimited
    max user processes (-u) 14335
    virtual memory (kbytes, -v) unlimited
     
  16. swampy

    swampy Well-Known Member

    Joined:
    Jan 30, 2004
    Messages:
    148
    Likes Received:
    0
    Trophy Points:
    0
    I think it is fixed now i forced a cpanel update did the above and for good measure rebooted server

    Thanks
    Swampy
     
  17. GuiPos

    GuiPos Well-Known Member

    Joined:
    Jul 9, 2003
    Messages:
    59
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Indonesia / Germany
    i got the same issue since the last cpanel update to WHM 10.6.0 cPanel 10.6.0-R55
    CentOS 3.5 i686 - WHM X v3.1.0 it get more and more in the staus emails.

    i did try the solutions in whm - tweak settings -
    lets see if this do the trick.

    what else i should do ?

    Thank you.
     
  18. jackie46

    jackie46 BANNED

    Joined:
    Jul 25, 2005
    Messages:
    537
    Likes Received:
    0
    Trophy Points:
    0
    We are seeing this issue all though our error_log on 10.0.8 S21. Obviously its not restricted to just the Current release.

    How do we fix it please?
     
  19. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Try, WHM > Tweak Settings > and hit save. Then restart httpd.
     
  20. jamesbond

    jamesbond Well-Known Member

    Joined:
    Oct 9, 2002
    Messages:
    738
    Likes Received:
    1
    Trophy Points:
    18
    I just upgraded to php 4.4.1 and this error started appearing afterwards. Doing above didn't help.

    Also tried "Modify Apache Memory Usage" and restarting apache, didn't help.
     
Loading...

Share This Page