XF 1.2 Fatal Error: Maximum execution time of 30 seconds exceeded - uploading avatar


Formerly CyclingTribe
First time I've ever seen this in my error logs:

ErrorException: Fatal Error: Maximum execution time of 30 seconds exceeded - library/XenForo/Image/ImageMagick/Pecl.php:249
Generated By: XXXXXXXXX, Today at 19:43
Stack Trace

#0 [internal function]: XenForo_Application::handleFatalError()
#1 {main}

Request State

array(3) {
  ["url"] => string(46) "http://www.cyclechat.net/account/avatar-upload"
  ["_GET"] => array(0) {
The only change I've made in this regard recently is to allow slightly larger avatars (125kb) and an increase in the allowed upload attachment size from 1024kb to 2048kb.

Could either of those changes have impacted to this degree?

Shaun :D


XenForo developer
Staff member
If you use Imagemagick, thumbnailing avatars (and attachments) will maintain animation, but if there are a lot of frames in the animation, this may take a substantial amount of time. In general, large image manipulation can be time consuming.

Nothing in particular to worry about unless it's happening with frequency, with various images.


Formerly CyclingTribe
Thanks Mike. I've not had it before so will just keep an eye out and if it happens with greater frequency, tweak the sizes.

BTW - is it a PHP timeout? Can I extend it to, say, 45 seconds?


Well-known member
You can, though it's probably not necessary. You can add a line like this to config.php:
Thanks, I had the same problem today trying to attach a 1.28mb animated gif file. The site would consistently error out trying to upload it.