I have a Magento 2.1.2 site hosted on Centos 7, Apache 2.4, running on PHP 7.
The site is responding with a 503 response whenever a page is requested that does not exist. For instance, articles on the old site that no longer make sense or products we no longer sell.
When a product or a CMS page exists the site works as you'd expect. It just has problems when the content does not exist.
When a 503 happens it creates an error report. The reports look like this:
a:4:{i:0;s:52:"Front controller reached 100 router match iterations";i:1;s:4069:"#0 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#1 /var/www/html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#2 /var/www/html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'requestPreproce...')
#3 /var/www/html/magento2/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(94): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#4 /var/www/html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#5 /var/www/html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#6 /var/www/html/magento2/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#7 /var/www/html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#8 /var/www/html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#9 /var/www/html/magento2/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#10 /var/www/html/magento2/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#11 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#12 /var/www/html/magento2/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(68): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#13 /var/www/html/magento2/vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#14 /var/www/html/magento2/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#15 /var/www/html/magento2/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#16 /var/www/html/magento2/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#17 /var/www/html/magento2/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#18 {main}";s:3:"url";s:20:"/articles/wep-vs-wpa";s:11:"script_name";s:10:"/index.php";}[xxx@xxxx report]$
The error is the "Front controller reached 100 router match iterations" problem. I have tried clearing the cache, re-compiling etc but to no avail.
Can anybody suggest a way to find out what the problem is?
Update 2/12/2016 I have finally managed to get my debugging setup working. The routerList in the FrontController looks like this:
ourbrandrouter Solwin\Ourbrand\Controller\Router
standard Magento\Framework\App\Router\Base
urlrewrite Magento\UrlRewrite\Controller\Router
Blog Mirasvit\Blog\Controller\Router
Core Mirasvit\Core\Controller\Router
cms Magento\Cms\Controller\Router
loffaq Lof\Faq\Controller\Router
default Magento\Framework\App\Router\DefaultRouter
Next step is to get a default site up and running and debug that to find out what is supposed to be happening but isn't in my setup.
Update 8/12/16 When PluginList.__inheritPlugins method is called with $type = "Magento/Framework/App/FrontController" using the vanilla version of the site, the following is returned in $plugins:
front-controller-builtin-cache
front-controller-varnish-cache
store-cookie-validate
install
requestProcessor
When the same method is called with the same $type using my site, the following is returned in $plugins:
front-controller-builtin-cache
front-controller-varnish-cache
Precisely why that is I don't know. Would help a lot if I knew how modules were loaded, so that I could see if that was working okay. Perhaps I should disable all third party modules to see if that narrows down the problem.