Magento “Front controller reached 100 router match iterations” error

后端 未结 10 2437
失恋的感觉
失恋的感觉 2020-12-05 04:54

My site is going down once or twice a day when it starts throwing the exception \"Front controller reached 100 router match iterations\". Once this happens access to the adm

相关标签:
10条回答
  • 2020-12-05 05:28

    This error was plaguing one of our clients also with very high loads.. changing the admin url value in local.xml fixed both problems

    0 讨论(0)
  • 2020-12-05 05:28

    Probably your admin frontname doesnt match with roouter->adminhtml->frontname in app/etc/local.xml

    Go to this directory app/etc/local.xml from your magento project and be sure it must be same with your admin panel url-frontname;

    <admin>
        <routers>
            <adminhtml>
                <args>
                    <frontName><![CDATA[myadminfrontname]]></frontName>
                </args>
            </adminhtml>
        </routers>
    </admin>
    

    Your url must be like this

    http://www.myproject.com/myadminfrontname/
    

    also you can remove your cache directory with this code.

    go to your project root directory and write

    rm -rfv var/*
    
    0 讨论(0)
  • 2020-12-05 05:31

    Finally I get over the issue, it was due to sortorder in etc frontend di.xml <item name="sortOrder" xsi:type="string">20</item> .I changed 20 to 60 and the error disappeared.

    See: Magento 2.1.2 Rourter action factory gets in to an infinite loop

    0 讨论(0)
  • 2020-12-05 05:36

    We've been having the same issue, and dug a little deeper to discover that the issue doesn't directly relate to which routers are loaded but which modules are loaded.

    To work this out we added the following debug code:

        app/code/core/Mage/Core/Controller/Varien/Front.php : Line 183
    
        if ($i>100) {
            file_put_contents('/tmp/debug.txt', Mage::getConfig()->getNode()->asNiceXml());
            Mage::throwException('Front controller reached 100 router match iterations');
        }
    

    When we check the output of this, we can see that ONLY the Mage_Core module is loaded (check the node 'config/modules'. We think there is some kind of race condition that is occuring that means the system is left with a partially formed config that is then cached.

    Would be interested in hearing if you have the same situation.

    0 讨论(0)
提交回复
热议问题