Answers.Body: <p>When a connection to the database can't be made Craft throws a 404. This sound like it might be your problem because you say it happens intermittently.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-19T03:10:41.230Z
Answers.Text: That has to be it! I remember seeing a db connection error in the logs this morning, though I cant find it for the life of me now. Plus, I regularly get db connection error when using the admin, but I have no idea why. I've only had one 404 since this morning. I'll continue to keep an eye on it. Thanks!
Answers.UserDisplayName: Incraigulous
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-18T18:16:48.737Z
Answers.LastActivityDate: 2015-07-18T18:16:48.737Z
Answers.UserDisplayName: Jamie Pittock
Body: <p>I have a template that fails to load intermittently, resulting in a 404. I haven't been able to debug it since 99% of the time the page loads perfectly.</p>
  
  <blockquote>
    <p>2015/07/18 12:18:57 [error] [exception.Craft\HttpException.404] exception 'Craft\HttpException' in /var/www/html/cotm_2015/craft/app/controllers/TemplatesController.php:59
    Stack trace:
    0 [internal function]: Craft\TemplatesController->actionRender('30-days-of-pray...', Array)</p>
  </blockquote>
  
  <p>Anyone have any ideas?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-18T16:43:44.537Z
Comments.Text: Can you share the URL of the template?
Comments.UserDisplayName: Brad Bell
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-19T03:01:19.133Z
Comments.Text: @BradBell, It's http://events.churchonthemove.com/thirty-days-of-prayer
Comments.UserDisplayName: Incraigulous
Tags: <templating><routes><404>
Title: Template fails to load intermittently
ThreadText: # Template fails to load intermittently
  
  (Asked by: username_0 on 2015-07-18)
  
  I have a template that fails to load intermittently, resulting in a 404. I haven't been able to debug it since 99% of the time the page loads perfectly.
  
  > 2015/07/18 12:18:57 [error] [exception.Craft\HttpException.404] exception 'Craft\HttpException' in /var/www/html/cotm\_2015/craft/app/controllers/TemplatesController.php:59
  > Stack trace:
  > 0 [internal function]: Craft\TemplatesController->actionRender('30-days-of-pray...', Array)
  
  Anyone have any ideas?
  
  **Tags:** templating, routes, 404
  
  > **Comments:**
  > **username_1**: Can you share the URL of the template?  
  > **username_0**: @username_1, It's http://events.churchonthemove.com/thirty-days-of-prayer  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2015-07-18. Score: 2 | Accepted answer
  
  When a connection to the database can't be made Craft throws a 404. This sound like it might be your problem because you say it happens intermittently.
  
  > **Comments:**
  > **username_0**: That has to be it! I remember seeing a db connection error in the logs this morning, though I cant find it for the life of me now. Plus, I regularly get db connection error when using the admin, but I have no idea why. I've only had one 404 since this morning. I'll continue to keep an eye on it. Thanks!  
  
  ---
  
  