image icon indicating copy to clipboard operation
image copied to clipboard

Maximum execution time of 60+2 seconds exceeded

Open Synchro opened this issue 4 years ago • 2 comments

I'm getting this error when using this library indirectly through Spatie's Media Library Pro:

Maximum execution time of 60+2 seconds exceeded (terminated) in vendor/intervention/image/src/Intervention/Image/Imagick/Decoder.php on line 26

The obvious answer is "increase the timeout", however, that won't help as I get this error even when the server has only been running for about 10 seconds, so it's not actually timing out after 62 sec, but much earlier (usually after only a few seconds). I've seen references to similar errors in here, and the answer to most has been to switch to imagick because it's faster (and thus less prone to timeouts), however, I only get this problem with imagick; it works fine with gd.

I'm running intervention/image 2.5.1 on PHP 8.0.5 with imagick compiled against ImageMagick 7.0.11-0.

Any idea what might be causing this?

Synchro avatar May 06 '21 16:05 Synchro

Is it possible to make a reproducible self-container script, with an example image?

mfn avatar May 06 '21 19:05 mfn

Unfortunately I've not been able to reproduce it reliably – sometimes it works, sometimes not, even with the same image, but now I've also seen it happen with gd. It's also hard to get at the context because it's deeply nested inside dependencies of dependencies, not code I'm calling directly. FWIW, I've not seen it happen in production (in PHP-FPM via nginx), only in artisan serve. In light of all that, I guess the best I can hope for is a vague idea!

Synchro avatar May 06 '21 19:05 Synchro

Can't reproduce. I have never encountered this error before.

olivervogel avatar Dec 09 '23 15:12 olivervogel