• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fatal error: Maximum execution time exceeded when uploading avatars

#1
It was originally 30 seconds so I bumped that up to 120 seconds. It's still timing out though. I am using the ImageMagick PECL Extension. No other errors show up.

Code:
[15-Jul-2011 16:20:16] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /home/insanein/public_html/community/library/XenForo/Image/ImageMagick/Pecl.php on line 261
[15-Jul-2011 16:31:41] PHP Fatal error:  Maximum execution time of 120 seconds exceeded in /home/insanein/public_html/community/library/XenForo/Image/ImageMagick/Pecl.php on line 178
 
#4
Actually this goes beyond avatars. I tried to upload the same 3 images here to a post on my forum and the JPG went, but the 2 animated GIFs didn't go through.

The smaller one shows 100% on the bar but goes no further and the larger GIF doesn't do anything. I even tried to upload them one at a time.
 

Jake Bunce

XenForo moderator
Staff member
#5
Both of those timeouts are Imagick functions.

Line 178:
Code:
$frame->thumbnailImage($width, $height, true);
Line 261:
Code:
$this->_image = $image->coalesceImages();
There is no way those images should take that long to process. Imagick is being slow for some reason.

What version of PHP and Imagick are you running?
 
#9
While the version of ImageMagick I have is not that far out of date, I am asking the host if they can update to the latest version.

Also asking for PHP upgrade since I'm on 5.2.17 and the current stable release is 5.3.6.
 
#10
One thing I noticed, the whole thing bombs before 30 seconds is up. But the error given is max execution time has been exceeded. How is this possible? Is there anything I should ask my host (Site5) to check?
 

rafass

Well-known member
#12
I have the same problem now
Code:
Fatal error: Maximum execution time of 120 seconds exceeded in /home/foro/public_html/library/XenForo/Image/ImageMagick/Pecl.php on line 332
PHP Version 5.4.36
 
Last edited:

Mike

XenForo developer
Staff member
#13
This can be an Imagick issue, or it can just be down to the work involved in resizing animated avatars. Unless you can do about recompiling Imagick and tweaking low level system stuff, the main alternative is to use the default GD processor.
 

rafass

Well-known member
#14
Yes, you're right.
FYI, that only happened trying to change the avatar at an user (1Mb("heavy")) as administrator in the ACP. in general works fine. Thanks for the explanation Mike.