Page 1 of 1

COM, cache and multi-user environment

Posted: 2008-08-14T13:14:35-07:00
by leww
We're using ImageMagick's COM interface on a Windows 2003 machine where it is called from classic ASP code (i.e. pre-.Net). There are multiple users uploading images, sometimes simultaneously. It's currently deployed using 6.2.8-Q8

Occasionally (but not consistently) IM COM will fail to open and process a file.

Convert returns the following errors (adjusted path and filename)

Code: Select all

convert: 445: unable to open cache `D:\InetPub\VirtualServers\Images\upload\filename.jpg': Permission denied: 
convert: 450: Application transferred too few scanlines `D:\InetPub\VirtualServers\Images\upload\filename.jpg':
The file is in fact valid and can be opened by IM Display on the console with no hesitation.

Given that at times, this and other files will process correctly I'm moderately confident that the TMP directories and the target directories have the appropriate permissions.

Is it possible that with the multiple ASP threads, that one picture's cache is corrupting anothers'? Or that there is some temporary filename collision problem?

Re: COM, cache and multi-user environment

Posted: 2008-08-14T13:43:00-07:00
by magick
Are you in a position to try the current release of ImageMagick, 6.4.2, and see if that fixes the problem?

Re: COM, cache and multi-user environment

Posted: 2008-08-15T10:47:37-07:00
by leww
I was hoping for a short term solution that would hold my users until I rolled out the server upgrade in September (which would have the latest IM build).

Re: COM, cache and multi-user environment

Posted: 2008-08-15T11:02:27-07:00
by magick
The exception returned is due to a permission problem on the ImageMagick pixel cache on disk. Its a simple open() system call that fails when it should not. You could try adding -debug cache to your script command line and see if that provides additional information for analysis.