Answers.Body: <blockquote>
    <p>My suspicion is that the server only has 512MB of RAM and it's crashing while attempting to process 300MB worth of data from just two of the 60 assets, as the entire site goes down in the attempt.</p>
  </blockquote>
  
  <p>I think you're 100% correct.  300MB of data leaves 212M for the rest of the operating system, MySQL, etc. to run, which isn't a lot.</p>
  
  <blockquote>
    <p>403.shtml or 500.shtml</p>
  </blockquote>
  
  <p>Those aren't Craft files... likely your web server is configured to serve them in the response if it detects a 403 or 500 response code.  Craft doesn't know what to do with them, so it tries to resolve them in the templates folder and you get the 404 error you're seeing.</p>
  
  <p>You can check your web server's error logs for the underlying error messages, but I'd certainly try to increase the amount of memory on that server.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T23:20:38.890Z
Answers.LastActivityDate: 2019-07-11T23:20:38.890Z
Answers.UserDisplayName: Brad Bell
Answers.Body: <p>I would check your server logs for any further clues.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-07-11T10:15:35.860Z
Answers.LastActivityDate: 2019-07-11T10:15:35.860Z
Answers.UserDisplayName: dmatthams
Body: <p>Client wants to be able to upload a 90MB .mp4 file to a local asset folder, that understandably throws a 'General error: 2006 MySQL server has gone away'.</p>
  
  <p>I uploaded the file directly to the server via FTP and attempting to re-index the assets throws an unknown error in the CP for each individual asset and crashes the server.</p>
  
  <p>Craft Log reads this error for each asset in the index: </p>
  
  <p>2019-07-10 13:20:43 [-][-][-][error][yii\web\HttpException:404] yii\web\NotFoundHttpException: Template not found: 403.shtml in "path"/craftcms/cms/src/controllers/TemplatesController.php:87</p>
  
  <p>With either 403.shtml or 500.shtml being the only difference between errors.</p>
  
  <p>There are ~60 assets, all under 8MB, except one other 200MB .mp4 file.</p>
  
  <p>My suspicion is that the server only has 512MB of RAM and it's crashing while attempting to process 300MB worth of data from just two of the 60 assets, as the entire site goes down in the attempt.</p>
  
  <p>PHP Options max_upload memory_limit are 256MB, post_max_size is 128MB, and max_execution and max_input_time time are 240s.</p>
  
  <p><a href="https://i.sstatic.net/c0E6S.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/c0E6S.png" alt="Running PHP Version 7.2, Craft 3.2, with no plugins except for Redactor."></a></p>
  
Tags: <assets><upload><server><index><reindex>
Title: Updating Asset Indexes Fails with TemplatesController Not Found Error in Craft Logs
ThreadText: # Updating Asset Indexes Fails with TemplatesController Not Found Error in Craft Logs
  
  (Asked by: username_0 on 2019-07-10)
  
  Client wants to be able to upload a 90MB .mp4 file to a local asset folder, that understandably throws a 'General error: 2006 MySQL server has gone away'.
  
  I uploaded the file directly to the server via FTP and attempting to re-index the assets throws an unknown error in the CP for each individual asset and crashes the server.
  
  Craft Log reads this error for each asset in the index:
  
  2019-07-10 13:20:43 [-][-][-][error][yii\web\HttpException:404] yii\web\NotFoundHttpException: Template not found: 403.shtml in "path"/craftcms/cms/src/controllers/TemplatesController.php:87
  
  With either 403.shtml or 500.shtml being the only difference between errors.
  
  There are ~60 assets, all under 8MB, except one other 200MB .mp4 file.
  
  My suspicion is that the server only has 512MB of RAM and it's crashing while attempting to process 300MB worth of data from just two of the 60 assets, as the entire site goes down in the attempt.
  
  PHP Options max\_upload memory\_limit are 256MB, post\_max\_size is 128MB, and max\_execution and max\_input\_time time are 240s.
  
  [![Running PHP Version 7.2, Craft 3.2, with no plugins except for Redactor.](https://i.sstatic.net/c0E6S.png)](https://i.sstatic.net/c0E6S.png)
  
  **Tags:** assets, upload, server, index, reindex
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2019-07-11. Score: 0 | Accepted answer
  
  > My suspicion is that the server only has 512MB of RAM and it's crashing while attempting to process 300MB worth of data from just two of the 60 assets, as the entire site goes down in the attempt.
  
  I think you're 100% correct. 300MB of data leaves 212M for the rest of the operating system, MySQL, etc. to run, which isn't a lot.
  
  > 403.shtml or 500.shtml
  
  Those aren't Craft files... likely your web server is configured to serve them in the response if it detects a 403 or 500 response code. Craft doesn't know what to do with them, so it tries to resolve them in the templates folder and you get the 404 error you're seeing.
  
  You can check your web server's error logs for the underlying error messages, but I'd certainly try to increase the amount of memory on that server.
  
  
  ---
  
  ### Answer by username_2 on 2019-07-11. Score: 0
  
  I would check your server logs for any further clues.
  
  
  ---
  
  