Answers.Body: <p>Because your database is a decent size, your server is exceeding the maximum execution time. That is what is resulting in the 504.</p>
  
  <p>Most likely, you will need to <a href="https://craftcms.com/docs/config-settings#backupDbOnUpdate" rel="nofollow noreferrer">disable the auto-update feature</a> and manually make a backup.</p>
  
  <p><a href="https://craftcms.com/support/504-gateway-timed-out-error" rel="nofollow noreferrer">Check out this article</a> on how you can trouble shoot this error. (Thanks Brad)</p>
  
  <p>You can also check with your hosting provider to see if they can increase the execution time.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-12T15:52:59.090Z
Answers.LastActivityDate: 2017-09-12T15:52:59.090Z
Answers.UserDisplayName: Damon
Answers.Body: <p>I've had this issue before.</p>
  
  <p>It's usually to do with one of two things for me - either the <a href="https://serverfault.com/questions/500467/apache2-proxy-timeout">PHP script timeout</a> value or the <a href="https://stackoverflow.com/questions/3829403/how-to-increase-the-execution-timeout-in-php">FPM proxy timeout</a> value.</p>
  
  <p>Another method of fixing this is to change the update settings in the general Craft <a href="https://craftcms.com/docs/config-settings" rel="nofollow noreferrer">configuration</a>:</p>
  
  <pre><code>'backupDbOnUpdate' =&gt; false,
  </code></pre>
  
  <p>Keep in mind though that you will need to back up the database yourself.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-12T15:58:06.180Z
Answers.LastActivityDate: 2017-09-12T15:58:06.180Z
Answers.UserDisplayName: N. Anderson
Body: <p>There have been a few updates to the system and some of the plugins I am using. I have installed everything locally and a plugin needed to run new migrations as a result of the update.</p>
  
  <p>Everything works great locally, I went to <code>/admin</code> to "Finish up" the updates.</p>
  
  <p>Now I have moved the files out to my staging server. I always manually update (even though Craft will do this for me). Once all of the files have deployed, I once again visit <code>/admin</code> to run the migrations.</p>
  
  <p>However, the database is quite large (> 100MB) and I am getting a <code>504 Gateway timeout error</code>.</p>
  
  <p>What can I do to fix this?</p>
  
Tags: <updating><manual-updates>
Title: Why is Craft returning a 504 during a system update?
ThreadText: # Why is Craft returning a 504 during a system update?
  
  (Asked by: username_0 on 2017-09-12)
  
  There have been a few updates to the system and some of the plugins I am using. I have installed everything locally and a plugin needed to run new migrations as a result of the update.
  
  Everything works great locally, I went to `/admin` to "Finish up" the updates.
  
  Now I have moved the files out to my staging server. I always manually update (even though Craft will do this for me). Once all of the files have deployed, I once again visit `/admin` to run the migrations.
  
  However, the database is quite large (> 100MB) and I am getting a `504 Gateway timeout error`.
  
  What can I do to fix this?
  
  **Tags:** updating, manual-updates
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2017-09-12. Score: 1 | Accepted answer
  
  Because your database is a decent size, your server is exceeding the maximum execution time. That is what is resulting in the 504.
  
  Most likely, you will need to [disable the auto-update feature](https://craftcms.com/docs/config-settings#backupDbOnUpdate) and manually make a backup.
  
  [Check out this article](https://craftcms.com/support/504-gateway-timed-out-error) on how you can trouble shoot this error. (Thanks Brad)
  
  You can also check with your hosting provider to see if they can increase the execution time.
  
  
  ---
  
  ### Answer by username_1 on 2017-09-12. Score: 2
  
  I've had this issue before.
  
  It's usually to do with one of two things for me - either the [PHP script timeout](https://serverfault.com/questions/500467/apache2-proxy-timeout) value or the [FPM proxy timeout](https://stackoverflow.com/questions/3829403/how-to-increase-the-execution-timeout-in-php) value.
  
  Another method of fixing this is to change the update settings in the general Craft [configuration](https://craftcms.com/docs/config-settings):
  
  ```
  'backupDbOnUpdate' => false,
  
  ```
  
  Keep in mind though that you will need to back up the database yourself.
  
  
  ---
  
  