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.

SOLVED Domain down

Discussion in 'EasyApache' started by keat63, Jul 26, 2017.

Tags:
  1. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    875
    Likes Received:
    25
    Trophy Points:
    28
    cPanel Access Level:
    Root Administrator
    in WHM, PHP Multi manager, I gave a domain it's own version of PHP so I could play with the editor in the domains cpanel.

    Now the web site won't launch.
    I'm seeing this in Apache error logs.

    [Wed Jul 26 20:59:56.723067 2017] [cgi:error] [pid 27222] [client x.xx.xx.xxx:53508] AH01215: PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 8192 bytes) in Unknown on line 0: /usr/local/cpanel/cgi-sys/ea-php70

    I changed the PHP back to inherited, i've stopped and restarted apache plus PHP-FPM, but I'm still unable to launch the web site.

    any ideas ?
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,086
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Do you notice any additional entries in the Apache error log when this happens? Also, feel free to open a support ticket using the link in my signature so we can take a closer look at the system and see what happened.

    Thank you.
     
  3. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    875
    Likes Received:
    25
    Trophy Points:
    28
    cPanel Access Level:
    Root Administrator
    I've been playing with ini_set('memory_limit earlier today, in the files on the domain.
    I was trying to determine if the local or master settings were being used.
    I set the limit to 2mb.
    It seems that this is leaving something behind, no amount of changing multiphp editor or inheriting PHP is affecting this.
    Even with the line removed, I'm hitting a 2mb limit.
    Change it to 128m it works, delete the line it reverts back to 2m
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,086
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you let us know the contents of the .htaccess file associated with this domain name?

    Thank you.
     
  5. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,407
    Likes Received:
    53
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hi,

    I would ask you to create a PHP info in the account in question and navigate to it and check what memory limit is being supplied to the account for use and make the change you mentioned and again check whether there is any change in the memory limit that you are seeing..
     
  6. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    875
    Likes Received:
    25
    Trophy Points:
    28
    cPanel Access Level:
    Root Administrator
    PHPinfo would suggest that the memory limit is 128m.
    However, the Apache logs suggest only 2m.

    AH01215: PHP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 65536 bytes) in Unknown on line 0: /usr/local/cpanel/cgi-sys/ea-php70

    I suspect, something maybe lurking in a cached file or similar


    below is the .htaccess

    Code:
    ### File Security ###
    <FilesMatch "\.(htaccess)$">
      Order Allow,Deny
      Deny from all
    </FilesMatch>
    
    ### Apache directory listing rules ###
    DirectoryIndex index.php index.htm index.html
    IndexIgnore *
    
    <ifModule mod_headers.c>
      Header always append X-Frame-Options SAMEORIGIN
    </ifModule>
    
    ### Rewrite rules for SEO functionality ###
    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteBase /
     
      ##### START v4 SEO URL BACKWARD COMPATIBILITY #####
      RewriteCond %{QUERY_STRING} (.*)$
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule cat_([0-9]+)(\.[a-z]{3,4})?(.*)$ index.php?_a=category&cat_id=$1&%1 [NC]
    
      RewriteCond %{QUERY_STRING} (.*)$
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule prod_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC]
    
      RewriteCond %{QUERY_STRING} (.*)$
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule info_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=document&doc_id=$1&%1 [NC]
    
      RewriteCond %{QUERY_STRING} (.*)$
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule tell_([0-9]+)(\.[a-z]{3,4})?$ index.php?_a=product&product_id=$1&%1 [NC]
    
      RewriteCond %{QUERY_STRING} (.*)$
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule _saleItems(\.[a-z]+)?(\?.*)?$ index.php?_a=saleitems&%1 [NC,L]
      ##### END v4 SEO URL BACKWARD COMPATIBILITY #####
    
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_URI} !=/favicon.ico
      RewriteRule ^(.*)\.html?$ index.php?seo_path=$1 [L,QSA]
    </IfModule>
    
    ### Default store 404 page ###
    ErrorDocument 404 /index.php
    
    ## Override default 404 error document for missing page resources ##
    <FilesMatch "\.(gif|jpe?g|png|ico|css|js|svg)$">
      ErrorDocument 404 "<html></html>
    </FilesMatch>
    ##### END CubeCart .htaccess
    
    # php -- BEGIN cPanel-generated handler, do not edit
    # This domain inherits the “PHP” package.
    # php -- END cPanel-generated handler, do not edit
    
    [\code]
     
    #6 keat63, Jul 27, 2017
    Last edited: Jul 27, 2017
  7. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    875
    Likes Received:
    25
    Trophy Points:
    28
    cPanel Access Level:
    Root Administrator
    It turned out to be a schoolboy error on my part

    In Multi PHI ini editor, I'd earlier in the day, inadvertantly, left out M at the end of memory limit, so PHP was allocating bytes and not MegaBytes.

    I guess playing with this domain only was what triggered the outage, no other domains were affected on the server, as these have been left untouched.

    It's easy to feel a fool occasionally.
     
    #7 keat63, Jul 27, 2017
    Last edited: Jul 27, 2017
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,086
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm glad to see you were able to solve the issue. Thank you for updating us with the outcome.
     
Loading...

Share This Page