1

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,
[email protected] 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...

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. Commented Jan 19, 2016 at 12:33

2 Answers 2

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.

1

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

<?php phpinfo();

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.

6
  • 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
    Commented May 21, 2015 at 7:13
  • What about the nginx/php-fpm/Suhosin/mod_security parts?
    – Brad Bell
    Commented May 21, 2015 at 17:10
  • 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
    Commented May 26, 2015 at 7:22
  • 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
    Commented May 26, 2015 at 15:36
  • But this is locally, though. I'm running MAMP pro.
    – peirix
    Commented May 27, 2015 at 10:55

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.