Page 1 of 1

Whole server hangs after convert

Posted: 2014-05-01T04:36:42-07:00
by Coded Monkey
Hello, we run the ImageMagick CLI at a variety of websites across our server, recently we rolled it out on a website specifically for printing and they supplied us with the following image: http://www.codedmonkey.com/temp/faultyimage.jpg The client that supplied the image told us it was a JPEG2000-file.

The image get's uploaded with jQuery File Upload and is converted using ImageMagick's convert to automatically create a scaled JPEG-version of the image. Here is where the trouble begins. The whole server stops responding for over a minute, bringing multiple websites down, before eventually showing the correct page with a converted image.

I don't have direct access to the ImageMagick logs, but the output of the action when send to the Apache error log shows

Code: Select all

image not a jpeg file
I've tried multiple things but I can't figure out what's wrong, I've looked at the supported image formats and it states to following:

Code: Select all

     JPEG* JPEG      rw-   Joint Photographic Experts Group JFIF format (62)<br />
      JPG* JPEG      rw-   Joint Photographic Experts Group JFIF format<br />
Is anybody familiar with this issue and what can I do to stop the server from hanging?
Thank you :)

Re: Whole server hangs after convert

Posted: 2014-05-01T06:03:49-07:00
by snibgo
For me, it takes 8 seconds to:

Code: Select all

convert faultyimage.jpg f.png
It doesn't complain.

This is on IM v6.8.9-0 on Windows 8.1. What version of IM are you running? Information about JPEG library version or whatever might also be useful.

Re: Whole server hangs after convert

Posted: 2014-05-01T06:31:56-07:00
by Coded Monkey
Thank you for replying.

The version of ImageMagick i'm running is ImageMagick 6.2.8 05/07/12 Q16
The information I get about libjpeg is: libjpeg.so.62, libjpeg.so.62.0.0

I also just tried

Code: Select all

identify -verbose faultyimage.jpg
and the server hung at this command too, don't know if that helps.

Thank you

Re: Whole server hangs after convert

Posted: 2014-05-01T06:41:25-07:00
by snibgo
v6.2.8 is old. Very old. Prehistoric. Probably this century, but only just.

The oldest version on my computer is v6.5.8. It is dated 2009. It converts your file without complaint.

Re: Whole server hangs after convert

Posted: 2014-05-01T07:19:15-07:00
by Coded Monkey
That sounds like a reasonable explanation, it should have been updated a long time ago like you said but we have a third party to handle our server management that's why it hasn't been done. I really appreciate the quick help, thank you :D