Fixing front controller reached 100 router match iterations

The problematic Magento Front controller reached 100 router match iterations exception is not a common issue, but it is certainly a big issue to the usability of a store and can be difficult to solve.

Where is this Magento exception thrown?

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

When is this exception thrown?

This exception is thrown whenever Magento cannot find a proper route for a request. In general, it should always be able to match a request with the router that handles 404 Not Found requests. As a result, in practice, this exception is only triggered when Magento has properly failed to generate routers or the cache has become corrupted.

How to solve this issue?

In our experience, there are two primary causes:

  1. CMS Module Disabled – The CMS module handles 404 not found requests which is the fallback router. As a result, if this module is disabled, then no router may be found. To resolve, simply enable the CMS module
  2. Cache is Corrupted – It could be the Magento cache became corrupted. In this case, the list of routers never gets loaded since it tries to load from cache and the cache does not have this data. As a result, fully flushing the Magento cache will resolve this issue.