Skip to content
beetlebugorg edited this page Aug 12, 2010 · 1 revision

There are three classes of errors in mod_dims;

  • Errors caused during downloading of a source image. These come directly from libcurl and are logged as-is.
  • Errors caused during an ImageMagick operation. These come directly from ImageMagik and are logged as-is.
  • Errors caused during processing of a request by mod_dims. These fall into the category of bad input checking, bad config, etc.

ImageMagick Timeout Error Format

[client <client ip address> Imagemagick operation, '<operation>', timed out after 4 ms

would be a message similar to Resize/Image or Save/Image.

Example:

[client 127.0.0.1] Imagemagick operation, 'Resize/Image', timed out after 45773 ms. (max: 20000), on request: /03-slipknot-082707.jpg/PGMC/resize/91300x9883!/

General Error Format

Errors will be in the following format in Apache’s error log:

[client <client ip address>] <source> error, '<source error message>', on request: <request uri>

Examples:

[client 10.181.182.244] Imagemagick error, 'no decode delegate for this image format @'', on request: /20080803WI55426251_WI.jpg/TEST/thumbnail/78x100/

[client 10.181.182.244] mod_dims error, 'Parsing resize geometry failed.', on reques: /test.jpg/resize/100/

[client 10.181.182.244] libcurl error, 'Timeout was reached', on request: http://o.aolcdn.com/feedgallery/music/i/s/slipknot/03-slipknot-082707.jpg

Common libcurl Error Messages

These messages are usually self explanatory. The URL that failed will be logged along with this message.

"Couldn't connect to server"

"Couldn't resolve DNS"

"Timeout was reached"

Common mod_dims Error Messages

"Requested URL has hostname that is not in the whitelist. (aaolcdn.com)"
The hostname of a remote URL did not match any hostnames or prefix globs in the whitelist.
"Application ID is not valid"
The client id for the request was not found in the list of clients.
"Parsing thumbnail geometry failed"
Request URL has an invalid geometry (e.g. 78×1a00 instead of 78×100).
"Parsing crop geometry failed"
Request URL has invalid geometry.
"Failed to read image"
This occurs if ImageMagick had trouble reading the image. Check to make sure MAGICK_HOME is exported in the Apache start script.
"Unable to stat image file"
This occurs when a local request is unable to find the image to resize.

Common ImageMagick Error Messages

"Memory allocation failed"
This should rarely occur, if ever, but usually when it does it’s the result of an ImageMagick timeout. It does not necessary mean the process has run out of memory. In low numbers this error can safely be ignored.
"unrecognized image format"

"no decode delegate for this image format"
This happens when ImageMagick doesn’t know how to read a source image. If this happens a lot the referrer should be checked and if necessary notify the owner of that page that they are using an invalid format. If the format appears valid check that the actual image really is that format by downloading it and verifying it in an image editor. If it is valid notify the developers of mod_dims.
"zero-length blob not permitted"
This may occur if there was a failure to download the source image or potentially if the source image was zero bytes. If this happens a lot the owner of the page making the request should be notified.
"Unsupported marker type 0x03"
This may occur if the image is corrupted. The “0×03” may be different depending on the corruption.

Other more serious errors

Any errors that have Assertion failed are results of bugs in the code and
can be considered serious.

Assertion failed: (wand->signature == WandSignature), function MagickGetImageFormat, file wand/magick-image.c, line 4137.