How to debug and fix front controller reached 100 router match iterations in Magento


While working with Magento, you may unexpectedly encounter the error: Front controller reached 100 router match iterations

In this tutorial, we’re going to debug the error and find a solution to solve this issue.

What caused this error?

This error is show when Magento cannot find a proper route for a request. Your routers start making infinitive references for dispatching requests.

In general, it should be able to match a request with the router that handles requests. The exception is only triggered when Magento has failed to create routers and the error Front controller reached 100 router match iterations will be displayed.

How to debug this error?

In app/code/core/Mage/Core/Controller/Varien/Front.php inside of the dispatch() function. The following code snippet will give you an idea:

Now, replace the code above with:

Now, wait for the error log to be generated var/log/system.log and see there debugging information, it will tell you what routers break the system.

How to solve this issue?

In this tutorial, I will bring out several solutions to solve this issues. (read more magento tutorial for beginners here)

There are many solutions and can be applied to specific errors log. As per my experience, there are two primary causes:

  • CMS Module Disabled: As you may know,  the CMS module handles 404 not found requests which is the fallback router. So, no router may be found if this module is disabled.  Just enable the CMS module and check if the issue is solved
  • Cache is Corrupted:  This is another common cause: Magento cache corrupted. In this case, the list of routers never gets loaded because it loads from cache and the corrupted cache does not contain this data. As a result, fully flushing the Magento cache will resolve thi issue. You can also delete /var/cache folder to remove cache corruption
  • If you see the error at admin section, then changing admin url in app/etc/local.xml can also fix the problem. Replace urltoadmin value with the url you want and your new admin url should be:

Another debug code that work:

You can also add the following debug code to app/code/core/Mage/Core/Controller/Varien/Front.php : Line 183:

Other possible solutions:

– If the error appears after visiting the admin at our store, then changing the admin url value in local.xml will fix solve this issue

– Removing the cache and locks manually may also resolve the issue for one of our clients

– Upgrade your hosting plan. Sometimes this is caused due to limited hosting resources. You can resolve by increase the power of your hosting, check our review of 5 best Magento hosting to pick a good one.

How to debug and fix front controller reached 100 router match iterations in Magento
1.77 (35.48%) 62 votes


About Author

Daniel is a Magento developer with 5 years of experience with customizing Magento extensions, Magento templates. He's main author at Magento explorer


  1. Hello

    Please Help me in my magento give me Below error

    Front controller reached 100 router match iterations

    I have Replce code above code .

    while (!$request->isDispatched() && $i++_routers as $router) {
    if ($router->match($this->getRequest())) {

    but not work please help me

  2. Hi,

    Kindly Check Mine Website As Its Homepage is Giving The Error And i Tried Many Solutions But Nothing Works…
    The Error is Displaying only on homepage all other Pages Are Working Fine.

    Here is The Error Message:

    Front controller reached 100 router match iterations

    #0 /home/itplanet/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(184): Mage::throwException(‘Front controlle…’)
    #1 /home/itplanet/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
    #2 /home/itplanet/public_html/app/Mage.php(683): Mage_Core_Model_App->run(Array)
    #3 /home/itplanet/public_html/index.php(87): Mage::run(”, ‘store’)
    #4 {main}

    Kindly Help..

  3. Check the Magento configuration settings Default No-route URL at

    . It should be set the default value cms/index/noRoute. Check the particular store value as well whether it default value has been overwritten here. Magento can go into an infinite loop till it hits the 100 iterations limit if it is not set properly.

  4. Hi
    Your post helped me to solve the problem on my Magento store, my problem was duo to corrupted cache and flushing the redis cache solved the problem for me.


  5. I am beginner in Magneto, so any tutorial or advice helps. It turns out my CMS Module was disabled, thanks for the help.

Leave A Reply