logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Apache View previous topic :: View next topic
Reply to topic   Topic: LimitInternalRecursion Problem.
Author
dizzyza



Joined: 31 Jan 2013
Posts: 6
Location: south africa

PostPosted: Thu 31 Jan '13 13:55    Post subject: LimitInternalRecursion Problem. Reply with quote

Hey peeps!
Please help me

I've been tasked to takeover a site that i never used to manage and i keep getting the following error.

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


I've also tried the fix that i've found in numerous places

Code:
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]


PHP Info

Code:
PHP 5.3.3 (cli) (built: Feb  2 2012 23:47:49)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies


Apache Info

Code:
Server version: Apache/2.2.15 (Unix)
Server built:   Feb 13 2012 22:31:42


and my .htacess file

Admin note:

Removed, use pastebin. See forum rules.


Woops. heres my virtual host entry as well

Code:
<VirtualHost *:81>
ServerAdmin blah@blah.co.za
    DocumentRoot /var/www2/blogs.timeslive.co.za
    ServerName blogs.timeslive.co.za
    ServerAlias blogs.timeslive.co.za
   LimitInternalRecursion 2000
ErrorLog logs/mublogs-timeslive-error_log
    CustomLog logs/mublogs-timeslive-access_log combined
    <Directory "/var/www2/blogs.timeslive.co.za">
        AllowOverride all
        Options FollowSymLinks Includes
        Order Allow,Deny
        Allow from all
    </Directory>
</VirtualHost>
Back to top
dizzyza



Joined: 31 Jan 2013
Posts: 6
Location: south africa

PostPosted: Mon 04 Feb '13 12:24    Post subject: Reply with quote

Anyone ? Shocked
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Mon 04 Feb '13 12:50    Post subject: Reply with quote

dizzyza wrote:
Anyone ? Shocked

It was kinda weekend Wink

However, to find out which of your rules causes this I think you should enable the rewrite log.
Back to top
dizzyza



Joined: 31 Jan 2013
Posts: 6
Location: south africa

PostPosted: Mon 04 Feb '13 13:53    Post subject: Reply with quote

You are indeed correct!

I see that i get that error roughly every 20 minutes. i will let the log run for a little while longer and post the result.

UPDATE!

Roughly 195 586 lines generated in an hour. do you know if i should be looking for something specific ?
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Mon 04 Feb '13 16:28    Post subject: Reply with quote

dizzyza wrote:
Roughly 195 586 lines generated in an hour. do you know if i should be looking for something specific ?


At some point (so I think) the rewrite rules go into a loop. Nasty, but it is your job to find that point.
From request time you should be able to find a single request that get redirected over and over again.
Back to top
dizzyza



Joined: 31 Jan 2013
Posts: 6
Location: south africa

PostPosted: Mon 04 Feb '13 19:43    Post subject: Reply with quote

Quote:
At some point (so I think) the rewrite rules go into a loop. Nasty, but it is your job to find that point.
From request time you should be able to find a single request that get redirected over and over again.


for sure!. i've done a count on the internal redirects and there was something like 3706.

here is a link to my rewrite log. http://blogs.timeslive.co.za/rewrite.log

Bear in mind it's a 48MB file Very Happy just so you know. I don't really know what i'm looking at. or what i should be looking for to be totally honest
Back to top
Jan-E



Joined: 09 Mar 2012
Posts: 1248
Location: Amsterdam, NL, EU

PostPosted: Tue 05 Feb '13 19:33    Post subject: Reply with quote

dizzyza wrote:
You are indeed correct!

I see that i get that error roughly every 20 minutes. i will let the log run for a little while longer and post the result.

Try to remove the 4 lines about the RSS feeds.
Back to top
dizzyza



Joined: 31 Jan 2013
Posts: 6
Location: south africa

PostPosted: Mon 25 Feb '13 10:20    Post subject: Update Reply with quote

Okay so. i've chopped down the .htaccess file to the following.

see here - http://pastebin.com/N4GQx73x

but still getting the problem
Quote:
Request exceeded the limit of 2000 internal redirects due to probable configuration error.
Use 'LimitInternalRecursion' to increase the limit if necessary.
Use 'LogLevel debug' to get a backtrace.


I do notice that i get that problem almost exactly every 20 minutes.

i also think i've nailed it down to this in my rewrite log thats giving the problem but i'm not sure which rule is causing it.

Code:
  (5) strip matching prefix: /var/www2/blogs.timeslive.co.za/index.php -> index.php
 (4) add subst prefix: index.php -> /index.php
 (1) [perdir /var/www2/blogs.timeslive.co.za/] internal redirect with /index.php [INTERNAL REDIRECT]
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 7298
Location: Germany, Next to Hamburg

PostPosted: Tue 26 Feb '13 13:19    Post subject: Reply with quote

Since it is index.php which causes what you should exclude it.

RewriteRule ^index\.php$ - [L]

or

RewriteCond %{REQUEST_URI} !^/index.php(.*)$

Try which works for you can report back.
Back to top
dizzyza



Joined: 31 Jan 2013
Posts: 6
Location: south africa

PostPosted: Tue 26 Feb '13 13:20    Post subject: Reply with quote

James Blond wrote:
Since it is index.php which causes what you should exclude it.

RewriteRule ^index\.php$ - [L]

or

RewriteCond %{REQUEST_URI} !^/index.php(.*)$

Try which works for you can report back.


Many thanks! will report back!

*EDIT*
Hi James Blond. Thanks for your assistance. i fear that i have failed to mention that this is a multisite wordpress install.

Having said that i implemented your fix and the main site works just fine but cannot go any deeper than that
Back to top


Reply to topic   Topic: LimitInternalRecursion Problem. View previous topic :: View next topic
Post new topic   Forum Index -> Apache