We had this mistake in the past. This is because Magento does not load the Cms module. No router on the system matches the URL, so the default router sets the path as the 404 page set in the admin panel. The default value for this is the Cms index controller, so if the Cms module is not loaded, it ends in an infinite loop.
The reason is a little harder to guess. In our case, we found that the cache was damaged when the system was under heavy load, and we cleared the cache directory. It can be fixed by running rm -rf var/cache/mage--* until the page rm -rf var/cache/mage--* successfully. Another reason is to disable the cms module in app/etc/modules .
source share