Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

500 Internal Server Error - Request exceeded the limit of 10 internal redirects

Discussion in 'EasyApache' started by chiareu, Feb 26, 2019.

  1. chiareu

    chiareu Member

    Joined:
    Feb 8, 2016
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bucharest
    cPanel Access Level:
    Root Administrator
    I am getting the following error when running a PHP web application on fresh installation of CentOS 7 (64bit) with latest version of cPanel:

    500 Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.

    AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

    Interesting is that after 2-3 refresh the page is loaded and after few clicks again 500 ISE

    It just happened to me yesterday. All websites and applications written on php have same issue.
    WP, Magento, custom php apps.
    Even in fresh installed WP with only default .htaccess
    Already tested various solutions proposed over forum. Nothing works.

    CENTOS 7.6
    WHM v78.0.12
    PHP 7.2 (ea-php72)
    php handlers: suphp
    System PHP-FPM
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,815
    Likes Received:
    443
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @chiareu


    Have you tried clearing your browser's cache? Do you have any redirects (even those going from http -> https matter in this instance)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. chiareu

    chiareu Member

    Joined:
    Feb 8, 2016
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bucharest
    cPanel Access Level:
    Root Administrator
    :) Of course, that was first try. The problem occurred on all browsers, different ISP/locations.
    To get websites work again I closed the PHP-FPM for all websites and run php as fcgi.

    So seams that there are some issue with PHP-FPM on last update; as I say, Wordpress, Magento, Drupal, custom php app, all failed to work. Intermittent error 500, no mater that was https or simple http.
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,815
    Likes Received:
    443
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @chiareu

    The issue is, this is not occurring on other servers so my assumption is that it's some part of the configuration you have present causing the issue. Do you have any Apache includes/customizations in place? Is there a specific error besides the redirect error in the apache error logs that provides any indication of the issue?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. chiareu

    chiareu Member

    Joined:
    Feb 8, 2016
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bucharest
    cPanel Access Level:
    Root Administrator
    Nope, Apache run with as configured by WHM.
    Usually I have allowed memory size errors.
    HP Fatal error: Allowed memory size of 2097152 bytes exhausted (tried to allocate 20480 bytes)
     
  6. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,815
    Likes Received:
    443
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @chiareu

    Yea, this is hitting the PHP memory limit restriction which seems to be set pretty low at 2MB
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. chiareu

    chiareu Member

    Joined:
    Feb 8, 2016
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bucharest
    cPanel Access Level:
    Root Administrator
    What it's really strange is that on Home »Software »MultiPHP INI Editor - memory_limit = 256

    If PHP run as suphp with php-fpm i have internal server error
    AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

    If PHP run as suphp - NO FPM - runs OK but slow

    Other option is to run PHP as fcgid, but with usual limits
     
    #7 chiareu, Mar 1, 2019
    Last edited: Mar 1, 2019
  8. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,815
    Likes Received:
    443
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    One thing to be sure of is it's set to that for the PHP version the site is using.

    I'd be inclined to assume there's something in the .htaccess causing this or something specific to the configuration of that site, unless it's occurring on all sites which would be fairly odd unless there was an apache include configuration issue.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. chiareu

    chiareu Member

    Joined:
    Feb 8, 2016
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Bucharest
    cPanel Access Level:
    Root Administrator
    Thank's for your help Lauren,
    I just figured that one was my mistake :( memory_limit = 256... there suppose to be 256M...bip bip M.
    Now the memory are loaded as it should.

    Anyway the old redirect loop are still present and php run as fcid (the only way the server work at least)
    In my apache pre_main_global.conf I have few settings:
    Code:
    SSLHonorCipherOrder On
    SSLProtocol all -SSLv2 -SSLv3
    Header set X-XSS-Protection "1; mode=block"
    Header set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
    Header always append X-Frame-Options SAMEORIGIN
    Header set X-Content-Type-Options nosniff
    #Header set Content-Security-Policy "default-src 'self';"
    Header set X-Permitted-Cross-Domain-Policies "none"
    #Header set Referrer-Policy "same-origin"
    And in pre_virtualhost_global.conf
    Code:
    <IfModule mod_fcgid.c>
    FcgidMaxRequestLen                      1073741824
    </IfModule>
    Now, constantly observe the error on apache logs
    Code:
    AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
    So I changed to 'debug' and voila:

    Code:
    [Fri Mar 01 14:56:19.155171 2019] [core:debug] [pid 9187:tid 47730931373824] core.c(3838): [client 123.456.78.90:37572] AH00121: r->uri = /403.shtml
    [Fri Mar 01 14:56:19.155180 2019] [core:debug] [pid 9187:tid 47730931373824] core.c(3845): [client 123.456.78.90:37572] AH00122: redirected from r->uri = /403.shtml
    [Fri Mar 01 14:56:19.155197 2019] [core:debug] [pid 9187:tid 47730931373824] core.c(3845): [client 123.456.78.90:37572] AH00122: redirected from r->uri = /403.shtml
    [Fri Mar 01 14:56:19.155207 2019] [core:debug] [pid 9187:tid 47730931373824] core.c(3845): [client 123.456.78.90:37572] AH00122: redirected from r->uri = /403.shtml
    [Fri Mar 01 14:56:19.155216 2019] [core:debug] [pid 9187:tid 47730931373824] core.c(3845): [client 123.456.78.90:37572] AH00122: redirected from r->uri = /403.shtml
    [Fri Mar 01 14:56:19.155225 2019] [core:debug] [pid 9187:tid 47730931373824] core.c(3845): [client 123.456.78.90:37572] AH00122: redirected from r->uri = /403.shtml
    [Fri Mar 01 14:56:19.155234 2019] [core:debug] [pid 9187:tid 47730931373824] core.c(3845): [client 123.456.78.90:37572] AH00122: redirected from r->uri = /403.shtml
    [Fri Mar 01 14:56:19.155243 2019] [core:debug] [pid 9187:tid 47730931373824] core.c(3845): [client 123.456.78.90:37572] AH00122: redirected from r->uri = /403.shtml
    [Fri Mar 01 14:56:19.155252 2019] [core:debug] [pid 9187:tid 47730931373824] core.c(3845): [client 123.456.78.90:37572] AH00122: redirected from r->uri = /403.shtml
    [Fri Mar 01 14:56:19.155261 2019] [core:debug] [pid 9187:tid 47730931373824] core.c(3845): [client 123.456.78.90:37572] AH00122: redirected from r->uri = /403.shtml
    [Fri Mar 01 14:56:19.155270 2019] [core:debug] [pid 9187:tid 47730931373824] core.c(3845): [client 123.456.78.90:37572] AH00122: redirected from r->uri = /index.php
    Now this kind of actions put the server down :(
     
  10. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,815
    Likes Received:
    443
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @chiareu

    I'm glad you caught it!


    And what is in the .htaccess for this domain as well as what are the permissions/ownership? Are you using a CMS and if so is it possible you've set a different home URI within the CMS?

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice