Error: The imagemagick convert command could not be executed - OVH

Hello,
i’m often facing an issue with Kirby 4(.5.0) and OVH.
When working locally every image is generated in the media folder without issue.
When pushing my website to OVH, or to my staging space hosted by OVH, I often have error 500 for some pictures.

The imagemagick convert command could not be executed: 'convert' -limit thread '16'

Deleting the media folder seems to help sometimes, with never all the images are correctly generated.
When working with GD things seems to be working better…

Here is my config:

 'thumbs' => [
        'driver' => 'im',
        'threads' => 16,
        'bin' => 'convert',
        'srcsets' => [
           ...
            ],
        ],

I’m working with ImageX and I’m starting to think that it might be related to my OVH config.

Which version of ImageMagic is running on the server?

What formats are you converting to?

Hey, thanks for the reply.
Version: ImageMagick 6.9.10-23 Q16 x86_64 20190101

I’m converting to avif first and webp second.
Also, my server is running php 8.2

In some worst cases, the website completely crashes and seems ton only display and error 500 page.

# Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at [mail] to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

One idea is that i thought the images imagemagick are processing are too heavy.

One more thing is that i have multiple kirby websites hosted on that space since its my development space for my different clients. Could this generate some conflicts? When one is crashing, all of the other one are also crashing and displaying the ´error 500’

Thanks.

PHP 8 support was introduced with Kirby 4.6.0.

Also, I’d try another PHP version which might run another ImageMagick version.

It would also make sense to run the convert command directly on the command line to check if there are any issues with webp or avif conversion. While your version is diffferent from the one here, you never know: https://forum.getkirby.com/t/imagemagik-not-converting-processing-images/

My mistake, edited the message, it’s 8.2.
Ill try to investigate.

Alright, fixed it so far. Seems like the files ImageMagick was processing were way too big.
Adding to my files template:

create:
  width: 2560

made things way smoother.

I also added some stricter restrictions on files upload :

accept:
  extension: jpg, png, jpeg, gif, mp4
  maxsize: 2500000

create:
  width: 2560

Thanks.