Jump to content

Imagesizer Maximum Execution Time


reems
 Share

Recommended Posts

Hi,

On one page I have by now more then 80 images.

Sometimes, but far too often, when I load the page in the admin, loading takes too much time and I get the following error message:

Error: Maximum execution time of 30 seconds exceeded (line 247 of /home/travelinlu/domains/travelinluxury.nl/public_html/wire/core/ImageSizer.php)

This line 247 contains:

imagegammacorrect($image, 2.0, 1.0);

I could maybe look at the server and do something about that, but to begin with, I don't understand why ImageSizer is called everytime when loading the page in the admin and likes to be resizing everytime. The images are resized already on upload (using the CropImage field).

Could anybody explain and knows how to solve this.

Thanks.

Link to comment
Share on other sites

@reems: if there are all images already created, the imagesizer get not involved. I bet there are not all imagevariations created now. But 30 seconds is far to long for only 80 images. Maybe there is one corrupted image in or what ever.

To get rid on it you may debug on which imagefiles it is called. This way you can track down the issue, I hope. If you have this on your local host you simply can add a line into the imagesizer file here, at the start of the resize function:

    $logentry = $this->filename;
    wire('log')->save( "debug_resizes", $logentry);

This way you get a list in site/assets/logs/debug_resizes.txt with all filenames on which the imagesizer is called. (site/assets/logs/ must be writeable, what it should be by default)

Just empty or delete the logfile if it contains previous entries and call your admin page that causes the issue only once and inspect the logfile afterwards. If you need further assistance come back please.

  • Like 6
Link to comment
Share on other sites

There were indeed two corrupted images. The originals were almost 10 Mb. I already adviced my client that images of that size are not ideal for a website.

It seems now oke.

Thanks.

  • Like 1
Link to comment
Share on other sites

The originals were almost 10 Mb. I already adviced my client that images of that size are not ideal for a website.

@reems: do you know that you can set a maximum length for images in the images fields?

admin => setup => fields => (click to edit your images field) => tab input :: look for "Max Image Dimensions"

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

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