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
This error was plaguing one of our clients also with very high loads.. changing the admin url value in local.xml fixed both problems
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/*
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
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.