Jump to content

PHP Timing Out at 90 Seconds


Recommended Posts

Hi all,

We've been having issues on our server with large GIF files (32 MB for the one generating these errors). It seems imagick.php is running into issues processing the saving of these files. Anyone have any tips or pointers?

[18-Dec-2017 22:10:59 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in /home/taylorho/public_html/system/Image/Imagemagick.php on line 93
[18-Dec-2017 22:24:55 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in /home/taylorho/public_html/system/Image/Imagemagick.php on line 93
[18-Dec-2017 22:31:20 UTC] PHP Fatal error: Maximum execution time of 90 seconds exceeded in /home/taylorho/public_html/system/Image/Imagemagick.php on line 93

Our server:

Centos7

8GB Ram

4 Core CPU

 

It also seems that because of imagick,, PHP-FPM pool increases to 80-85% of the server resources while this one file is uploading. Any pointers would be greatly appreciated.

Regards,

Nowe

Link to comment
Share on other sites

You are missing delegates:

Check from ssh using the command:

convert -list configure

You should get something:

DELEGATES      bzlib djvu mpeg fftw fontconfig freetype jng jpeg lcms openexr openjp2 pango png ps rsvg tiff webp wmf x xml zlib

 

Then check which one you need and missing from there and install it:

http://www.imagemagick.org/download/delegates/

and then recompile Imagemagick  :)

 

You can confirm the install and available formats with:

identify -list format

 

GIF* GIF       rw+   CompuServe graphics interchange format

 

Also check /tmp to not be full :)

 

Another one to check if you have installed the ImageMagick-devel and if not install it:

yum install ImageMagick-devel
Then recompile Imagemagick.

 

If it was ok and working with no issues for the same kind of files and without any adjustments stop working you may need also more power to your server so it will finish faster and avoid that error when you are working with many and so big files.....

Link to comment
Share on other sites

1 hour ago, ASTRAPI said:

You are missing delegates:

Check from ssh using the command:


convert -list configure

You should get something:


DELEGATES      bzlib djvu mpeg fftw fontconfig freetype jng jpeg lcms openexr openjp2 pango png ps rsvg tiff webp wmf x xml zlib

 

Then check which one you need and missing from there and install it:


http://www.imagemagick.org/download/delegates/

and then recompile Imagemagick  :)

 

You can confirm the install and available formats with:


identify -list format

 

GIF* GIF       rw+   CompuServe graphics interchange format

 

Also check /tmp to not be full :)

 

Another one to check if you have installed the ImageMagick-devel and if not install it:


yum install ImageMagick-devel

Then recompile Imagemagick.

 

If it was ok and working with no issues for the same kind of files and without any adjustments stop working you may need also more power to your server so it will finish faster and avoid that error when you are working with many and so big files.....

Thanks. I was hoping to avoid so many large files, but users are pushing for GIF files up to 50MB. Not my particular wish, but alas. Thank you for the info, I think I'll reinstall completely through the wget/make/make install method.

Link to comment
Share on other sites

Processing very large images tends to be resource intensive. ImageMagick performs better typically, but you may need to make more resources available.

You can try taking the image and processing it with imagemagick at command line to see if your server is able to handle it outside of PHP as a starting point.

Link to comment
Share on other sites

@bfarber, @ASTRAPI

Thank you both. It seems that even with 8GB of ram, the server just can't process the images. I've limited uploads to 20MB, which is about as much as we can expect. Especially if multiple sources are uploading at once. I will say that the odd thing is that if the script times out or resource usage can't handle it, it posts image "blanks". Like these:

error.png.734b2c60ee3c6259356ab8ea709d8964.png

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...