<p><strong>Step 01.</strong> 
Open your php.ini file.<br>
File path for php 5.6: /etc/php/5.6/apache2/php.ini<br>
File path for php 7.1: /etc/php/7.1/apache2/php.ini<br></p>

<p><strong>Step 02:</strong><br>
Then increase <code>max_exection_time</code> from <code>30</code> to <code>300</code> or other as you like. </p>

<p><strong>Step 03:</strong><br>
Restart your server <code>sudo service apache2 restart</code></p>

<p><strong>Step 04:</strong><br>
Go to your web's root directory then run this command <code>composer update</code></p>

<p>Now browse your site.</p>

CC BY-SA 4.0
2018-12-05T13:24:25.040Z
2018-12-05T13:24:25.040Z
johirpro
<p>If you put a <code>phpinfo.php</code> file in your public HTML folder with this in it:</p>

<pre><code>&lt;?php phpinfo();
</code></pre>

<p>Then load that page in your browser and search for <code>max_exection_time</code>, do you see your 60 second change?</p>

<p>If you're running nginx/php-fpm, they have their own, separate execution time settings you'll need to adjust.</p>

<p>If you're on Apache and running Suhosin or mod_security, they have additional execution times that you'll need to adjust as well.</p>

CC BY-SA 3.0
2015-05-21T07:13:33.047Z
Yeah, it says 60 seconds for execution time.
Also, don't know if it'll help, but I see that the same thing is happening when I try to run the database backup from the settings panel. It also times out at 30 seconds.
peirix
CC BY-SA 3.0
2015-05-21T17:10:23.530Z
What about the nginx/php-fpm/Suhosin/mod_security parts?
Brad Bell
CC BY-SA 3.0
2015-05-26T07:22:36.320Z
I didn't find any of those values, and I've also searched for any value that is set to 30, and there are no other properties that are set to 30.
peirix
CC BY-SA 3.0
2015-05-26T15:36:56.983Z
Some hosts (Rackspace, for example, but there are others) have a hard 30 second limit set at the router/firewall level for any given request. Could be you're hitting that.
Brad Bell
CC BY-SA 3.0
2015-05-27T10:55:02.013Z
But this is locally, though. I'm running MAMP pro.
peirix
CC BY-SA 3.0
2015-06-20T14:42:58.390Z
Do you run PHP as Apache module or as FastCGI? FastCGI has its own timeout setting.
Bob Olde Hampsink
CC BY-SA 3.0
2015-05-20T18:15:24.603Z
2015-12-17T18:38:40.567Z
2015-12-17T18:38:40.567Z
Brad Bell
<p>I'm trying to update from <code>2.3.2640</code> to <code>2.3.2644</code>, but I get a 500 error</p>

<pre><code>Internal Server Error
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator,
you@example.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.
More information about this error may be available
in the server error log.
</code></pre>

<p>When I look a the logs I can see that the backup was successful</p>

<pre><code>2015/05/20 13:23:15 [info] [application] [Forced] Finished backing up database.
in /xxx/craft/app/services/UpdatesService.php (399)
in /xxx/craft/app/controllers/UpdateController.php (317)
in /xxx/craft/app/etc/web/WebApp.php (869)
</code></pre>

<p>And the sql file is in the backup folder.</p>

<p>Any idea where I might look to fix this error?</p>

<p><strong>EDIT:</strong> I see that it's timing out at 30 seconds. I've set my php file to have <code>max_execution_time = 60</code>, but it's still timing out at 30 seconds...</p>

CC BY-SA 3.0
2016-01-19T12:33:17.287Z
I've had an issue when updating Craft where the files it replaces are created with incorrect permissions, it might be worth resetting your app folder permissions recursively to ensure it's not a lone file that's causing the issue.
William Isted
<updates>
500 error on updating Craft
# 500 error on updating Craft

(Asked by: username_0 on 2015-05-20)

I'm trying to update from 2.3.2640 to 2.3.2644, but I get a 500 error
Internal Server Error
The server encountered an internal error or
misconfiguration and was unable to complete
your request.
Please contact the server administrator,
you@example.com and inform them of the time the error occurred,
and anything you might have done that may have
caused the error.
More information about this error may be available
in the server error log.

When I look a the logs I can see that the backup was successful
2015/05/20 13:23:15 [info] [application] [Forced] Finished backing up database.
in /xxx/craft/app/services/UpdatesService.php (399)
in /xxx/craft/app/controllers/UpdateController.php (317)
in /xxx/craft/app/etc/web/WebApp.php (869)

And the sql file is in the backup folder.
Any idea where I might look to fix this error?
EDIT: I see that it's timing out at 30 seconds. I've set my php file to have max_execution_time = 60, but it's still timing out at 30 seconds...

**Tags:** updates
> **Comments:**
> **username_1**: I've had an issue when updating Craft where the files it replaces are created with incorrect permissions, it might be worth resetting your app folder permissions recursively to ensure it's not a lone file that's causing the issue.  

---

## 2 answers

### Answer by username_2 on 2018-12-05. Score: 2

**Step 01.**
Open your php.ini file.  
File path for php 5.6: /etc/php/5.6/apache2/php.ini  
File path for php 7.1: /etc/php/7.1/apache2/php.ini

**Step 02:**  
Then increase `max_exection_time` from `30` to `300` or other as you like.

**Step 03:**  
Restart your server `sudo service apache2 restart`

**Step 04:**  
Go to your web's root directory then run this command `composer update`

Now browse your site.


---

### Answer by username_3 on 2015-05-20. Score: 1

If you put a phpinfo.php file in your public HTML folder with this in it:

Then load that page in your browser and search for max_exection_time, do you see your 60 second change?
If you're running nginx/php-fpm, they have their own, separate execution time settings you'll need to adjust.
If you're on Apache and running Suhosin or mod_security, they have additional execution times that you'll need to adjust as well.

> **Comments:**
> **username_0**: Yeah, it says 60 seconds for execution time. Also, don't know if it'll help, but I see that the same thing is happening when I try to run the database backup from the settings panel. It also times out at 30 seconds.  
> **username_3**: What about the nginx/php-fpm/Suhosin/mod_security parts?  
> **username_0**: I didn't find any of those values, and I've also searched for any value that is set to 30, and there are no other properties that are set to 30.  
> **username_3**: Some hosts (Rackspace, for example, but there are others) have a hard 30 second limit set at the router/firewall level for any given request. Could be you're hitting that.  
> **username_0**: But this is locally, though. I'm running MAMP pro.  
> **username_4**: Do you run PHP as Apache module or as FastCGI? FastCGI has its own timeout setting.  

---

