Request exceeded the limit of 10 internal redirects due to probable configuration error.

Hi guys, I have installed domain mapping plugin in my network some time ago. Sometimes happens that mysql database stop to work, wordpress said that there is no connection available to the db, and to fix the problem I have to restart mysql.

Watching my apache log I found multiple times this error:

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.

Here my .htaccess file:

RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php

For example this error is showed when a client try to load

/wp-content/plugins/wysija-newsletters/readme.txt

path.

I don't have any plugin "wysija-newsletters" so I think that wordpress shoud return a error without a internal error server.

Do you have some tips for me?

Thanks so much for your support.

Davide

  • aristath

    Hello there @davide.peri, I hope you're well today!

    Is this on a VPS or on a shared host?
    If it's on a VPS, can you pelase check your httpd.conf file? It should have AllowOverride All and Allow from all like below:

    <VirtualHost demo.local>
        ServerAdmin postmaster@localhost
        DocumentRoot "C:/xampp/htdocs/demo"
        ServerName demo.local
        ServerAlias demo.local
        <Directory "/var/www/">
       	Options Indexes FollowSymLinks Includes ExecCGI
        	AllowOverride All
            Order allow,deny
            Allow from all
        </Directory>
    </VirtualHost>

    Please advise,
    Ari.

  • davide.peri

    Hi Ari, very well thanks!

    I'm using a VPS running Debian 7 and apache.

    Here my apache host configuration:

    <VirtualHost <ip_address>:80>
    DocumentRoot /home/d/ftp/creativesocietylibrary.org
    ServerName maindomain.org
    ServerAlias *.maindomain.org
    ServerAlias otherdomainX.org
    ServerAlias http://www.otherdomainX.org
    ServerAlias otherdomainY.org
    ServerAlias http://www.otherdomainY.org
    <Directory "/path_to_the_website/maindomain.org">
    Options FollowSymLinks MultiViews
    </Directory>
    </VirtualHost>

    So, do you suggest to add

    AllowOverride All
    Order allow,deny
    Allow from all

    to my directory configuration?

    Thanks for your help

    PS: <ip_address> = my real ip address

  • davide.peri

    Hi Ari, thanks for your tips.

    I change my vhost configuration to:

    <VirtualHost <IP_server>:80>
    DocumentRoot /path_to_the_folder/maindomain.org
    ServerName maindomain.org
    ServerAlias *.maindomain.org
    Serveralias domainX.org
    ServerAlias http://www.domainX.org
    ServerAlias domainZ.org
    ServerAlias http://www.domainZ.org
    <Directory "/path_to_the_folder/maindomain.org">
    Options FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    </VirtualHost>

    but the problem persist.
    If enter for example into a fake URL for example

    I still receive a internal error server.

    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.

    Any ideas?

    Thanks for your support

    Best regards
    Davide

  • Tyler Postle

    Hey Davide,

    Hope you're doing well today and thanks for your question!

    Hope you don't mind if I chime in while Ari is offline.

    In most cases I've seen with this error it has to do with the .htaccess; however, after looking at yours, it seems to be correct already. You are using a multisite with sub-domains correct?

    Do you have any security plugins? Try diabling them and trying to load it again and see if the issue still persists :slight_smile:

    If it does, then let us know and we'll continue to troubleshoot the issue.

    All the best,
    Tyler

    PS. I saw this thread that may be of some use: http://wordpress.org/support/topic/request-exceeded-the-limit-of-10-internal-redirects worth a look at any rate.

    Look forward to your reply!

    Cheers,
    Tyler

  • aristath

    Hello again @davide.peri, I hope you're well today!

    Could you please grant me access to your backend so that I may see exactly what is happening?
    To do so, from your dashboard go to WPMUDEV => Support => Support Access and click on the "Grant access" button.

    Is this a production site or one you're building now? If it's not a production site, could you please also set WP_DEBUG to true in your wp-config.php file?

    Cheers,
    Ari.

  • davide.peri

    Hi Ari, today I have another mysql downtime.

    Watching /var/log/apache2/error.org starts at:

    [Tue Aug 19 08:32:02 2014] [error] [client 199.16.156.126] PHP Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (111) in /.............../<maindomain>.org/wp-includes/wp-db.php on line 1372

    /var/log/mysql/mysql.org
    /var/log/mysql/mysql.log

    are empty.

    Watching /var/log/syslog file I found something interesting:

    Aug 19 08:32:02 localhost kernel: [22873137.315683] apache2 invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0, oom_score_adj=0
    Aug 19 08:32:02 localhost kernel: [22873137.316384] apache2 cpuset=/ mems_allowed=0
    Aug 19 08:32:02 localhost kernel: [22873137.316698] Pid: 17348, comm: apache2 Not tainted 3.2.0-4-amd64 #1 Debian 3.2.41-2+deb7u2
    Aug 19 08:32:02 localhost kernel: [22873137.317303] Call Trace:
    Aug 19 08:32:02 localhost kernel: [22873137.317575]  [<ffffffff810b6ac2>] ? dump_header+0x78/0x1bd
    Aug 19 08:32:02 localhost kernel: [22873137.317921]  [<ffffffff81163cae>] ? security_real_capable_noaudit+0x40/0x4f
    Aug 19 08:32:02 localhost kernel: [22873137.318493]  [<ffffffff810b6e8b>] ? oom_kill_process+0x49/0x271
    Aug 19 08:32:02 localhost kernel: [22873137.318850]  [<ffffffff810b7586>] ? out_of_memory+0x2ea/0x337
    Aug 19 08:32:02 localhost kernel: [22873137.319203]  [<ffffffff810bb214>] ? __alloc_pages_nodemask+0x629/0x7aa
    Aug 19 08:32:02 localhost kernel: [22873137.319577]  [<ffffffff81199890>] ? blk_flush_plug_list+0x1b9/0x1c8
    Aug 19 08:32:02 localhost kernel: [22873137.319944]  [<ffffffff810e470a>] ? alloc_pages_current+0xc7/0xe4
    Aug 19 08:32:02 localhost kernel: [22873137.320343]  [<ffffffff810b61c7>] ? filemap_fault+0x24f/0x33e
    Aug 19 08:32:02 localhost kernel: [22873137.320703]  [<ffffffff810ce344>] ? __do_fault+0xc8/0x3ac
    Aug 19 08:32:02 localhost kernel: [22873137.321049]  [<ffffffff810d08fb>] ? handle_pte_fault+0x298/0x79f
    Aug 19 08:32:02 localhost kernel: [22873137.321408]  [<ffffffff810cde99>] ? pte_offset_kernel+0x16/0x35
    Aug 19 08:32:02 localhost kernel: [22873137.321767]  [<ffffffff813509bd>] ? do_page_fault+0x312/0x337
    Aug 19 08:32:02 localhost kernel: [22873137.322120]  [<ffffffff81037ed3>] ? set_next_entity+0x32/0x55
    Aug 19 08:32:02 localhost kernel: [22873137.322472]  [<ffffffff8100d025>] ? paravirt_write_msr+0xb/0xe
    Aug 19 08:32:02 localhost kernel: [22873137.322829]  [<ffffffff8100d6ec>] ? __switch_to+0x181/0x258
    Aug 19 08:32:02 localhost kernel: [22873137.323178]  [<ffffffff81039854>] ? finish_task_switch+0x88/0xb9
    Aug 19 08:32:02 localhost kernel: [22873137.323539]  [<ffffffff8134c694>] ? __schedule+0x5ac/0x5c3
    Aug 19 08:32:02 localhost kernel: [22873137.323885]  [<ffffffff8134dfe5>] ? async_page_fault+0x25/0x30
    Aug 19 08:32:02 localhost kernel: [22873137.324255] Mem-Info:
    Aug 19 08:32:02 localhost kernel: [22873137.324545] Node 0 DMA per-cpu:
    Aug 19 08:32:02 localhost kernel: [22873137.324836] CPU    0: hi:    0, btch:   1 usd:   0
    Aug 19 08:32:02 localhost kernel: [22873137.325162] Node 0 DMA32 per-cpu:
    Aug 19 08:32:02 localhost kernel: [22873137.325457] CPU    0: hi:  186, btch:  31 usd:  64
    Aug 19 08:32:02 localhost kernel: [22873137.325783] active_anon:231123 inactive_anon:369 isolated_anon:0
    Aug 19 08:32:02 localhost kernel: [22873137.325784]  active_file:61 inactive_file:138 isolated_file:0
    Aug 19 08:32:02 localhost kernel: [22873137.325785]  unevictable:0 dirty:0 writeback:0 unstable:0
    Aug 19 08:32:02 localhost kernel: [22873137.325787]  free:12255 slab_reclaimable:1755 slab_unreclaimable:2970
    Aug 19 08:32:02 localhost kernel: [22873137.325788]  mapped:396 shmem:387 pagetables:4827 bounce:0
    Aug 19 08:32:02 localhost kernel: [22873137.334240] Node 0 DMA free:4660kB min:680kB low:848kB high:1020kB active_anon:11104kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:15680kB mlocked:0kB dirty:0kB writeback:0kB mapped:4kB shmem:0kB slab_reclaimable:76kB slab_unreclaimable:12kB kernel_stack:0kB pagetables:16kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? yes
    Aug 19 08:32:02 localhost kernel: [22873137.336423] lowmem_reserve[]: 0 994 994 994
    Aug 19 08:32:02 localhost kernel: [22873137.336777] Node 0 DMA32 free:44360kB min:44372kB low:55464kB high:66556kB active_anon:913388kB inactive_anon:1476kB active_file:244kB inactive_file:552kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:1018068kB mlocked:0kB dirty:0kB writeback:0kB mapped:1580kB shmem:1548kB slab_reclaimable:6944kB slab_unreclaimable:11868kB kernel_stack:1504kB pagetables:19292kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:6443 all_unreclaimable? yes
    Aug 19 08:32:02 localhost kernel: [22873137.339004] lowmem_reserve[]: 0 0 0 0
    Aug 19 08:32:02 localhost kernel: [22873137.339339] Node 0 DMA: 5*4kB 6*8kB 7*16kB 6*32kB 5*64kB 5*128kB 5*256kB 0*512kB 0*1024kB 1*2048kB 0*4096kB = 4660kB
    Aug 19 08:32:02 localhost kernel: [22873137.340124] Node 0 DMA32: 1030*4kB 718*8kB 466*16kB 257*32kB 94*64kB 38*128kB 7*256kB 0*512kB 0*1024kB 1*2048kB 1*4096kB = 44360kB
    Aug 19 08:32:02 localhost kernel: [22873137.340939] 599 total pagecache pages
    Aug 19 08:32:02 localhost kernel: [22873137.341236] 0 pages in swap cache
    Aug 19 08:32:02 localhost kernel: [22873137.341520] Swap cache stats: add 0, delete 0, find 0/0
    Aug 19 08:32:02 localhost kernel: [22873137.341857] Free swap  = 0kB
    Aug 19 08:32:02 localhost kernel: [22873137.342165] Total swap = 0kB
    Aug 19 08:32:02 localhost kernel: [22873137.346097] 262125 pages RAM
    Aug 19 08:32:02 localhost kernel: [22873137.346395] 5359 pages reserved
    Aug 19 08:32:02 localhost kernel: [22873137.346675] 83199 pages shared
    Aug 19 08:32:02 localhost kernel: [22873137.346952] 238933 pages non-shared
    Aug 19 08:32:02 localhost kernel: [22873137.347244] [ pid ]   uid  tgid total_vm      rss cpu oom_adj oom_score_adj name
    Aug 19 08:32:02 localhost kernel: [22873137.347838] [  310]     0   310     5301      110   0     -17         -1000 udevd
    Aug 19 08:32:02 localhost kernel: [22873137.348473] [ 1898]     0  1898    14248     1205   0       0             0 rsyslogd
    Aug 19 08:32:02 localhost kernel: [22873137.349069] [ 1951]     0  1951     4167       39   0       0             0 atd
    Aug 19 08:32:02 localhost kernel: [22873137.349648] [ 2055]     0  2055     5101       60   0       0             0 cron
    Aug 19 08:32:02 localhost kernel: [22873137.350231] [ 2093]   102  2093     7488       99   0       0             0 dbus-daemon
    Aug 19 08:32:02 localhost kernel: [22873137.350828] [ 2399]     0  2399     4063       41   0       0             0 getty
    Aug 19 08:32:02 localhost kernel: [22873137.351414] [ 2400]     0  2400     4063       41   0       0             0 getty
    Aug 19 08:32:02 localhost kernel: [22873137.351995] [ 2401]     0  2401     4063       42   0       0             0 getty
    Aug 19 08:32:02 localhost kernel: [22873137.352605] [ 2402]     0  2402     4063       42   0       0             0 getty
    Aug 19 08:32:02 localhost kernel: [22873137.353193] [ 2403]     0  2403     4063       40   0       0             0 getty
    Aug 19 08:32:02 localhost kernel: [22873137.353771] [ 2404]     0  2404     4063       41   0       0             0 getty
    Aug 19 08:32:02 localhost kernel: [22873137.354357] [ 2413]     0  2413    15507      274   0       0             0 console-kit-dae
    Aug 19 08:32:02 localhost kernel: [22873137.354960] [23289] 65534 23289    16876      125   0       0             0 memcached
    Aug 19 08:32:02 localhost kernel: [22873137.355553] [16457]  1000 16457     5815      124   0       0             0 screen
    Aug 19 08:32:02 localhost kernel: [22873137.356151] [16458]  1000 16458     5128      402   0       0             0 bash
    Aug 19 08:32:02 localhost kernel: [22873137.356747] [18396]     0 18396     9468      141   0       0             0 master
    Aug 19 08:32:02 localhost kernel: [22873137.357332] [18402]   105 18402    10026      150   0       0             0 qmgr
    Aug 19 08:32:02 localhost kernel: [22873137.357917] [21530]  1000 21530     5850      168   0       0             0 screen
    Aug 19 08:32:02 localhost kernel: [22873137.358506] [21531]  1000 21531     5160      436   0       0             0 bash
    Aug 19 08:32:02 localhost kernel: [22873137.359082] [21676]  1000 21676     5793      116   0       0             0 top
    Aug 19 08:32:02 localhost kernel: [22873137.359660] [ 5049]  1000  5049     5850      168   0       0             0 screen
    Aug 19 08:32:02 localhost kernel: [22873137.360260] [ 5050]  1000  5050     5160      436   0       0             0 bash
    Aug 19 08:32:02 localhost kernel: [22873137.360866] [ 9149]  1000  9149     5792      116   0       0             0 top
    Aug 19 08:32:02 localhost kernel: [22873137.361445] [ 9145]  1000  9145     5848      162   0       0             0 screen
    Aug 19 08:32:02 localhost kernel: [22873137.362039] [ 9146]  1000  9146     5175      451   0       0             0 bash
    Aug 19 08:32:02 localhost kernel: [22873137.362628] [19228]     0 19228     5608      277   0       0             0 dovecot
    Aug 19 08:32:02 localhost kernel: [22873137.363223] [19231]   107 19231     3262       44   0       0             0 anvil
    Aug 19 08:32:02 localhost kernel: [22873137.363806] [19232]     0 19232     3294       84   0       0             0 log
    Aug 19 08:32:02 localhost kernel: [22873137.364418] [19234]     0 19234     5857      516   0       0             0 config
    Aug 19 08:32:02 localhost kernel: [22873137.365010] [ 2034]     0  2034    30267      438   0       0             0 proftpd
    Aug 19 08:32:02 localhost kernel: [22873137.365595] [11575]     0 11575     1045       35   0       0             0 mysqld_safe
    Aug 19 08:32:02 localhost kernel: [22873137.366196] [11902]   106 11902    94161    19237   0       0             0 mysqld
    Aug 19 08:32:02 localhost kernel: [22873137.366780] [11903]     0 11903     1397       27   0       0             0 logger
    Aug 19 08:32:02 localhost kernel: [22873137.367368] [12414]     0 12414    95967     5027   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.367953] [14583]     0 14583    12483      153   0     -17         -1000 sshd
    Aug 19 08:32:02 localhost kernel: [22873137.368566] [14623]     0 14623     1029       35   0       0             0 acpid
    Aug 19 08:32:02 localhost kernel: [22873137.369151] [15095]     0 15095    46373     3694   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.369744] [17348]    33 17348   106118    13885   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.370334] [17353]    33 17353   106163    13927   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.370921] [17359]    33 17359   107033    14713   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.371509] [17360]    33 17360   106897    14635   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.372107] [17378]    33 17378   107128    14817   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.372718] [17379]    33 17379   107033    14710   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.373304] [17384]   105 17384     9986      137   0       0             0 pickup
    Aug 19 08:32:02 localhost kernel: [22873137.373891] [17715]    33 17715   105120    13854   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.374476] [17719]    33 17719   105084    13810   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.375066] [17720]    33 17720   105084    13810   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.375650] [17723]    33 17723   105082    13809   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.376257] [17724]    33 17724   105052    13842   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.376852] [17725]    33 17725   105082    13809   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.377438] [17726]    33 17726   105018    13807   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.378026] [17727]    33 17727   105056    13847   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.378610] [17728]    33 17728   105018    13807   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.379201] [17729]    33 17729   105120    13852   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.379784] [17730]    33 17730   120989    13920   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.380400] [17731]    33 17731   119364    12976   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.380989] [17732]    33 17732   120216    13478   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.381579] [17733]    33 17733   115744     8817   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.382166] [17734]    33 17734    96191     4950   0       0             0 apache2
    Aug 19 08:32:02 localhost kernel: [22873137.382756] Out of memory: Kill process 11902 (mysqld) score 75 or sacrifice child
    Aug 19 08:32:02 localhost kernel: [22873137.383346] Killed process 11902 (mysqld) total-vm:376644kB, anon-rss:76948kB, file-rss:0kB
    Aug 19 08:32:02 localhost mysqld_safe: Number of processes running now: 0
    Aug 19 08:32:02 localhost mysqld_safe: mysqld restarted
    Aug 19 08:32:03 localhost mysqld: 140819  8:32:03 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead.
    Aug 19 08:32:03 localhost mysqld: 140819  8:32:03 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
    Aug 19 08:32:03 localhost mysqld: 140819  8:32:03 [Note] Plugin 'FEDERATED' is disabled.
    Aug 19 08:32:03 localhost mysqld: 140819  8:32:03 InnoDB: The InnoDB memory heap is disabled
    Aug 19 08:32:03 localhost mysqld: 140819  8:32:03 InnoDB: Mutexes and rw_locks use GCC atomic builtins
    Aug 19 08:32:03 localhost mysqld: 140819  8:32:03 InnoDB: Compressed tables use zlib 1.2.7
    Aug 19 08:32:03 localhost mysqld: 140819  8:32:03 InnoDB: Using Linux native AIO
    Aug 19 08:32:03 localhost mysqld: 140819  8:32:03 InnoDB: Initializing buffer pool, size = 128.0M
    Aug 19 08:32:03 localhost mysqld: InnoDB: mmap(137363456 bytes) failed; errno 12
    Aug 19 08:32:03 localhost mysqld: 140819  8:32:03 InnoDB: Completed initialization of buffer pool
    Aug 19 08:32:03 localhost mysqld: 140819  8:32:03 InnoDB: Fatal error: cannot allocate memory for the buffer pool
    Aug 19 08:32:03 localhost mysqld: 140819  8:32:03 [ERROR] Plugin 'InnoDB' init function returned error.
    Aug 19 08:32:03 localhost mysqld: 140819  8:32:03 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
    Aug 19 08:32:03 localhost mysqld: 140819  8:32:03 [ERROR] Unknown/unsupported storage engine: InnoDB
    Aug 19 08:32:03 localhost mysqld: 140819  8:32:03 [ERROR] Aborting
    Aug 19 08:32:03 localhost mysqld:
    Aug 19 08:32:03 localhost mysqld: 140819  8:32:03 [Note] /usr/sbin/mysqld: Shutdown complete
    Aug 19 08:32:03 localhost mysqld:
    Aug 19 08:32:03 localhost mysqld_safe: mysqld from pid file /var/run/mysqld/mysqld.pid ended

    Thanks for your support.

  • aristath

    Hello again!

    From the above error messages it seems to me that the VPS you're using either runs low on memory (it now has max.128M if I understood correctly), or there's an error in your database.

    Could you please optimize and repair your db tables (using for example phpmyadmin) and then allocate more memory for your MySQL.
    You can find a good article on configuring that here: http://mysql.rjweb.org/doc.php/memory

    I hope that helps!

    Cheers,
    Ari.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.