Results 1 to 10 of 10
  1. #1

    Cannot allocate memory error

    Hello there.


    I own a VPS server with CentOS, and 1.5GB RAM memmory, which is reinstalled few days ago.

    I noted that i periodically get error - 500 internal server error pages, but for most time site is working fine.

    I wanted to investigate what caused this error and i found this in server error log:
    Code:
    [Wed Feb 01 07:35:28 2012] [error] [client 208.86.198.103] (12)Cannot allocate memory: couldn't create child process: /usr/sbin/suphp for /home/admin/opusteno/forum/index.php
    [Wed Feb 01 07:35:28 2012] [error] [client 208.86.198.103] (12)Cannot allocate memory: couldn't create child process: /usr/sbin/suphp for /home/admin/opusteno/forum/index.php
    [Wed Feb 01 07:35:28 2012] [error] [client 208.86.198.103] (12)Cannot allocate memory: couldn't create child process: /usr/sbin/suphp for /home/admin/opusteno/forum/index.php
    There is plenty of those errors in error log.
    Now im not sure what is causing it, as i don't use suphp, and my memmory is not full though.
    RAM usage is never higher than 45%
    CPU usage - 12%
    HDD usage - 13%
    When RAM usage goes higher than 80% i should get email allert, but i never get some, so RAM memmory is not the problem i think.

    I guess that it's some kind of problem with chmod, but i'm not sure.

    Also, for what it's worth, i'm using kloxo panel.

    Regards.

  2. #2
    Join Date
    Sep 2007
    Location
    In ur heart
    Posts
    60
    Do you have installed any memory monitoring modules on your VPS, if no then contact VPS provider and consult this issue with them because some VPS provider company apply memory usage monitoring on the main node where your VPS is hosted....
    Regards,
    G R S

  3. #3
    Join Date
    Feb 2012
    Location
    WHT
    Posts
    80
    you are sure your vps has ded Hardware ? i mean maybe your server provider
    oversell and physical your memory is limit !

  4. #4
    Join Date
    Nov 2005
    Location
    Michigan, USA
    Posts
    3,837
    I'm assuming this is OpenVZ or Virtuozzo, simply type:

    cat /proc/user_beancounters

    Look in the far right column for failcounts. There is more than one memory limit in OpenVZ and it is possible your host hasn't set them properly or your server is using an abnormal amount of one.
    ByteonSite - Affordable cloud servers in 4 US Locations - New Site & Services Soon

  5. #5
    Hello again.

    I thought that my problem dissapeared but yesterday i noticed the same errors again.

    I'm pretty sure that my memory is not limited, as i work with my provider for a long period of years now, and i trust them.

    Here is what i get after typing cat /proc/user_beancounters:
    Code:
    [root@vserver /]# cat /proc/user_beancounters
    Version: 2.5
           uid  resource                     held              maxheld                                                                                                      barrier                limit              failcnt
          111:  kmemsize                 15552357             51200000             5                                                                                        1200000             51200000                19220
                lockedpages                     0                    6                                                                                                         2048                 2048                    0
                privvmpages                119652               209268                                                                                                       262144               262144                    0
                shmpages                      911                 1615                                                                                                       128000               128000                    0
                dummy                           0                    0                                                                                                            0                    0                    0
                numproc                        67                  150                                                                                                          500                  500                    0
                physpages                   42054               136242                                                                                                            0            200000000                    0
                vmguarpages                     0                    0                                                                                                       262144               262144                    0
                oomguarpages                42054               136263                                                                                                       262144               262144                    0
                numtcpsock                     38                  169                                                                                                         4096                 4096                    0
                numflock                        6                    8                                                                                                         2048                 2048                    0
                numpty                          1                    1                                                                                                           32                   32                    0
                numsiginfo                      0                   22                                                                                                         1024                 1024                    0
                tcpsndbuf                  743568              6096328             2                                                                                        0480000             20480000                    0
                tcprcvbuf                  631064              2567184             2                                                                                        0480000             20480000                    0
                othersockbuf                21928              2233200             2                                                                                        0480000             20480000                    0
                dgramrcvbuf                     0                29336             1                                                                                        0240000             10240000                    0
                numothersock                   33                   89                                                                                                         2048                 2048                    0
                dcachesize                      0                    0             1                                                                                        0240000             10240000                    0
                numfile                      3330                 6564                                                                                                        50000                50000                    0
                dummy                           0                    0                                                                                                            0                    0                    0
                dummy                           0                    0                                                                                                            0                    0                    0
                dummy                           0                    0                                                                                                            0                    0                    0
                numiptent                      24                   24                                                                                                         2048                 2048                    0
    Does it look okay? What else can i try? Any suggestions please?

  6. #6
    Join Date
    Mar 2002
    Location
    Philadelphia, PA
    Posts
    2,508
    I always find it helpful to look at 'VMPeak' of an individual process to see if at any point usage went up explicitly.

    This is the maximum virtual memory space used by the process, in kB (1024 bytes).

    You can review i.e: /proc/1617/status

    Format is: /proc/pid/status
    Linux junkie | steward.io

  7. #7
    Join Date
    Feb 2008
    Location
    Houston, Texas, USA
    Posts
    2,863
    Hopefully you've had Sysstat installed all along. See what sar -r returns.

    Regards
    UNIXy - Fully Managed Servers and Clusters - Established in 2006
    [ cPanel Varnish Nginx Plugin ] - Enhance LiteSpeed and Apache Performance
    www.unixy.net - Los Angeles | Houston | Atlanta | Rotterdam
    Love to help pro bono (time permitting). joe > unixy.net

  8. #8
    Quote Originally Posted by viGeek View Post
    I always find it helpful to look at 'VMPeak' of an individual process to see if at any point usage went up explicitly.

    This is the maximum virtual memory space used by the process, in kB (1024 bytes).

    You can review i.e: /proc/1617/status

    Format is: /proc/pid/status
    Thank you.
    I tried with random pid, and here is the results:
    Code:
    [root@vserver 9582]# cat status
    Name:   php
    State:  S (sleeping)
    SleepAVG:       63%
    Tgid:   9582
    Pid:    9582
    PPid:   16131
    TracerPid:      0
    FNid:   111
    Uid:    0       0       0       0
    Gid:    0       0       0       0
    FDSize: 256
    Groups:
    envID:  111
    VPid:   9582
    PNState:        0
    StopState:      0
    VmPeak:    28544 kB
    VmSize:    28540 kB
    VmLck:         0 kB
    VmHWM:     15224 kB
    VmRSS:     15224 kB
    VmData:    10656 kB
    VmStk:        88 kB
    VmExe:      4264 kB
    VmLib:     10724 kB
    VmPTE:        72 kB
    StaBrk: 0977e000 kB
    Brk:    0a194000 kB
    StaStk: bf96f6a0 kB
    Threads:        1
    SigQ:   0/139248
    SigPnd: 0000000000000000
    ShdPnd: 0000000000000000
    SigBlk: 0000000000000000
    SigIgn: 0000000000001006
    SigCgt: 0000000180000000
    SigSvd: 0000000000000000
    CapInh: 00000000fdcceeff
    CapPrm: 00000000fdcceeff
    CapEff: 00000000fdcceeff
    Cpus_allowed:   7fffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff,ffffffff
    Mems_allowed:   00000000,00000001
    TaskUB: 111
    MMUB:   111
    Anything looks strange there to you?

    @UNIXy - sorry, i don't have Sysstat installed.

  9. #9
    Join Date
    Feb 2008
    Location
    Houston, Texas, USA
    Posts
    2,863
    Quote Originally Posted by Nightmaster View Post

    @UNIXy - sorry, i don't have Sysstat installed.
    It's never too late. I'd get it installed. You just need a couple of days worth of history to figure things out.

    Cheers
    Joe / UNIXY
    UNIXy - Fully Managed Servers and Clusters - Established in 2006
    [ cPanel Varnish Nginx Plugin ] - Enhance LiteSpeed and Apache Performance
    www.unixy.net - Los Angeles | Houston | Atlanta | Rotterdam
    Love to help pro bono (time permitting). joe > unixy.net

  10. #10
    Are you sure the memory limit is not set too low in php.ini ?

Similar Threads

  1. Replies: 9
    Last Post: 11-21-2010, 12:35 AM
  2. suphp error - Cannot allocate memory
    By kselva in forum Hosting Security and Technology
    Replies: 9
    Last Post: 02-15-2010, 06:59 AM
  3. Cannot allocate memory error
    By justinbytes in forum Hosting Security and Technology
    Replies: 2
    Last Post: 01-19-2010, 11:18 PM
  4. iconv: unable to allocate buffer for input: Cannot allocate memory
    By Ba$im in forum Hosting Security and Technology
    Replies: 12
    Last Post: 07-01-2009, 02:56 AM
  5. "bash: fork: Cannot allocate memory" error
    By wir3d in forum Hosting Security and Technology
    Replies: 13
    Last Post: 03-29-2008, 02:32 PM

Related Posts from theWHIR.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •