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.

Upgrade EasyApache 4 - Out of memory 500 errors

Discussion in 'EasyApache' started by sighthosting, Jul 24, 2016.

  1. sighthosting

    sighthosting Registered

    Joined:
    Jul 24, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    London
    cPanel Access Level:
    Website Owner
    Everything was working perfectly on EasyApache 3, I received some notifications from app developers that everyone is moving towards PHP 7 so I decided to upgraded to EA4 on my vps and since then just about every application is running out of memory specially wordpress, whmcs are the ones battling the most.

    I am not a wizard at what the optimal memory, but my servers memory usage doesn't seem right all of a sudden.

    Can someone please advise me what I should do.

    I ran [root@cloud ~]# free -h

    total used free shared buff/cache available

    Mem: 3.7G 630M 299M 43M 2.8G 2.8G

    Swap: 1.0G 11M 1.0G
     
  2. Sujoy Dhar

    Sujoy Dhar Member

    Joined:
    Jul 24, 2016
    Messages:
    20
    Likes Received:
    5
    Trophy Points:
    3
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Yes Me too facing the same issue !
     
  3. sighthosting

    sighthosting Registered

    Joined:
    Jul 24, 2016
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    London
    cPanel Access Level:
    Website Owner
    if anyone else has the same issue go to 'Multiphp manager' in Whm and ensure you have the write php version assigned to a domain. then you go to 'MultiPHP INI Editor' and you change the memory limit in there. Just for safety sake I restarted apache too! good luck
     
  4. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello :),

    You need to increase your memory limit which you have setup in php.ini file. Please check your php configuration and increase it.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Did you notice the increased memory usage after switching to PHP 7, or is this just with EasyApache 4 alone, without switching to PHP 7?

    Thank you.
     
  6. nightaddix

    nightaddix Active Member
    PartnerNOC

    Joined:
    Jul 7, 2008
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    I'm seeing this as well after upgrading to EasyApache4. I'm seeing this both from websites running PHP 5.6.24 and from websites running PHP 7. I have CSF installed on my server and it seems that after the upgrade to EasyApache4 (which was done right after I upgraded to cPanel 11.58.0.12), I get notifications from LFD saying that scripts were using more than 300M. As I only have a handfull of websites and 8G of RAM, I bumped the limit to 400 but I'm still getting messages:

    Time: Thu Aug 4 20:19:35 2016 +0100
    Account: xxx
    Resource: Virtual Memory Size
    Exceeded: 461 > 400 (MB)
    Executable: /opt/cpanel/ea-php70/root/usr/bin/php-cgi
    Command Line: /opt/cpanel/ea-php70/root/usr/bin/php-cgi /home/xxx/public_html/xxx.com/owncloud/remote.php
    PID: 28025 (Parent PID:26792)
    Killed: No

    I'm running CentOS Linux release 7.2.1511 (Core) w/ kernel 3.10.0-327.10.1.el7.x86_64 and have cPanel set to use the RELEASE (recommended) version. Apache version is Apache/2.4.23 (cPanel). Please let me know if I can provide any further information. Thank you.
     
  7. linux4me2

    linux4me2 Well-Known Member

    Joined:
    Aug 21, 2015
    Messages:
    79
    Likes Received:
    13
    Trophy Points:
    8
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    I had a problem with this as well after upgrading to EasyApache4. For some reason, the memory_limit for each installed PHP version was only 30M in EasyApache4, whereas it was 64M in EasyApache3. What fixed it for me was changing the memory_limit for each installed PHP version as 24x7server recommended by going Software -> MultiPHP INI Editor and adjusting the memory_limit to the 128M PHP default value, then clicking "Apply." I'm running Litespeed, but I didn't have to restart it for the change to take effect.
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you let us know which limit you increased? Ensure you review the following document if you are adjusting the PHP memory limit:

    cPanel's PHPRC PHP Patch for EasyApache 4 - EasyApache 4 - cPanel Documentation

    Thank you.
     
  9. nightaddix

    nightaddix Active Member
    PartnerNOC

    Joined:
    Jul 7, 2008
    Messages:
    30
    Likes Received:
    0
    Trophy Points:
    6
    Hi,

    Apologies for the confusion, I increased the LFD alert limit because I got bored of the alerts. Just got another one:

    Time: Fri Aug 12 19:45:34 2016 +0100
    Account: xxx
    Resource: Virtual Memory Size
    Exceeded: 437 > 400 (MB)
    Executable: /opt/cpanel/ea-php56/root/usr/bin/php-cgi
    Command Line: /opt/cpanel/ea-php56/root/usr/bin/php-cgi /home/xxx/public_html/wp-admin/admin-ajax.php
    PID: 26725 (Parent PID:19434)
    Killed: No


    I know it's virtual memory, but still, this only started happening after the migration to EasyApache4. I'd be more than happy to post any configs needed for further investigation.
     
  10. MikeTheWebGuy

    MikeTheWebGuy Registered

    Joined:
    Aug 17, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Since upgrading to 58 I've been getting a lot of emails like this...

    Code:
    Resource:     Virtual Memory Size
    Exceeded:     310 > 200 (MB)
    Executable:   /opt/cpanel/ea-php70/root/usr/bin/php-cgi
    Command Line: /opt/cpanel/ea-php70/root/usr/bin/php-cgi /home/clientname/public_html/index.php
    PID:          15161 (Parent PID:15003)
    Killed:       No
    This email is showing up from every account that has PHP, not just a single script.
    MultiPHP shows the handler is SuPHP but this looks like it's set for CGI to me. When I look inside that directory (/opt/cpanel/ea-php70/root/usr/bin/), shouldn't I see something like php-suphp?

    TL;DR: How do I put an end to exclusively using resources?

    Longer question as I'm learning and want to know what's going on: What's going on? What am I not doing properly?




    Code:
    /etc/redhat-release:CentOS release 6.8 (Final)
    /usr/local/cpanel/version:11.58.0.20
    /var/cpanel/envtype:kvm
    CPANEL=release
    Server version: Apache/2.4.23 (cPanel)
    Server built:   Jul 20 2016 18:30:57
    PHP 7.0.9 (cli) (built: Jul 25 2016 15:10:26) ( NTS )
    Copyright (c) 1997-2016 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    mysql  Ver 14.14 Distrib 5.6.31, for Linux (x86_64) using  EditLine wrapper
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you open a support ticket using the link in my signature so we can take a closer look? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
  12. kenwmitchell

    kenwmitchell Registered

    Joined:
    Jun 8, 2016
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    United States
    cPanel Access Level:
    Root Administrator
    How did this turn out? I upgraded a server to EA4 tonight and immediately started getting VM usage 3x higher than my previous average. Also, I noticed that the binary is now
    /opt/cpanel/ea-php70/root/usr/bin/php-cgi instead of /usr/bin/php, but that might be expected.

    Code:
    # /usr/local/cpanel/bin/rebuild_phpconf --current
    DEFAULT PHP: ea-php56
    ea-php54 SAPI: suphp
    ea-php55 SAPI: suphp
    ea-php56 SAPI: suphp
    
    Thanks in advance!
     
  13. dorac

    dorac Member

    Joined:
    Jun 7, 2013
    Messages:
    20
    Likes Received:
    3
    Trophy Points:
    3
    Location:
    South Africa
    cPanel Access Level:
    Root Administrator
    I'm having exactly the same problem. After upgrading, all (a lot of) sites seem to fail if using more than 50mb.

    [19-Sep-2016 14:16:42 UTC] PHP Fatal error: Out of memory (allocated 50069504) (tried to allocate 12288 bytes) in /home/spider/public_html/wp-admin/includes/class-wp-upgrader.php on line 212

    Wordpress and Prestashop so far seem to be affected.

    I have PHP 5.4, 5.5, 5.6, and 5.7. All of which have been modified accordingly via the php manager and ini files. I set the memory limit to 128M, and even phpinfo() confirms this - the apps still run out of memory.

    Anyone have any clue?
     
  14. aolbrechts

    aolbrechts Registered

    Joined:
    Feb 24, 2016
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Belgium
    cPanel Access Level:
    Root Administrator
    Same thing here, just upgraded to EasyApache 4 ans I keep on receiving those alerts for virtual memory usage.
    Seems to have doubled since EA3

    What config should be changed to optimise this memory usage ?

    Thanks,
    Antoine
     
  15. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,678
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    I recommend increasing the memory limit for each PHP version in-use via:

    "WHM Home » Software » MultiPHP INI Editor"

    Also, check to verify if the accounts affected by the out of memory errors are using a custom php.ini file. There's a document here that explains how this works with EasyApache 4 for each PHP handler:

    The cPanel PHPRC PHP Patch for EasyApache 4 - EasyApache 4 - cPanel Documentation

    Thank you.
     
Loading...

Share This Page