2

My log is getting hammered nonstop by the same error about every second (see image). Any idea what's going on here?

Text is:

Level       error
Category    exception.Craft\HttpException.404
Message     Craft\HttpException in /home/folder/public_html/craft/app/controllers/TemplatesController.php:72

Image here

3 Answers 3

2

You can try installing the Retour plugin to get a log of all of the 404 errors and their referrers, and potentially handle them via redirects.

0

The Error is thrown here

public function actionRender($template, array $variables = array())
{
    // Does that template exist?
    if (craft()->templates->doesTemplateExist($template))
    {
        $this->renderTemplate($template, $variables);
    }
    else
    {
        throw new HttpException(404);
    }
}

Maybe you are trying to render a template that does not exist? Are you not in dev mode and don't have a homepage template so it tries to redirect again and again? Or maybe the same issue with an error template? Do you have a {% redirect %} in your templates?

Edit: or maybe you deleted some files? You could output the $template variable in the controller in order to see which template causes the error

0
0

A 404 is just someone/something requesting a resources (path, image, JS file, CSS file, etc.) that your web server and Craft cannot resolve on your site.

If this is on a publicly facing website, there's about a 99.99% chance it's just some script/bot probing different URLs for various endpoints to execute known exploits. It's extremely common on any public facing website.

If you look in your actual craft/storage/runtime/logs files instead of the log viewer in the Control Panel, you'll see the same 404's being logged along with the REQUEST_URI. That will show the non-existent path/resource that was requested.

1
  • Thanks, Brad. Looking through the logs in 'craft/storage/runtime/logs' was a helpful recommendation and - you're right - the site is getting hit by a ton of bots (it was previously hosted by WordPress but I moved it over to Craft) and then I think a lot of podcast apps are hitting a non-existant .xml file (client uses FeedBurner now but used to host their podcast XML locally). Commented Nov 30, 2017 at 13:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.