Composite creates huge files
Composite creates huge files
Hello,
I have been trying to use composite.exe to add watermarks to some of my images delivered from a specific location on apache.
I have used the following:
<IfModule mod_ext_filter.c>
ExtFilterDefine watermark mode=output intype=image/jpeg cmd="C:/ImageMagick/composite.exe -gravity Center -quality 60 -watermark 20.0 D:/www/************.com/public/images/logo-watermark.png - -"
</IfModule>
However, when i start apache and try to see the images, they look ok but imagemagick creates some huge (sometimes 2-3GB) files on C:\ with filenames like magick-404545 (no file extension)
These files are huge and it creates many of them. As a result, my server's performance drops very low and the drive C:\ gets full.
I have no idea why this happens.
Any idea?
Thanx!
Al.
I have been trying to use composite.exe to add watermarks to some of my images delivered from a specific location on apache.
I have used the following:
<IfModule mod_ext_filter.c>
ExtFilterDefine watermark mode=output intype=image/jpeg cmd="C:/ImageMagick/composite.exe -gravity Center -quality 60 -watermark 20.0 D:/www/************.com/public/images/logo-watermark.png - -"
</IfModule>
However, when i start apache and try to see the images, they look ok but imagemagick creates some huge (sometimes 2-3GB) files on C:\ with filenames like magick-404545 (no file extension)
These files are huge and it creates many of them. As a result, my server's performance drops very low and the drive C:\ gets full.
I have no idea why this happens.
Any idea?
Thanx!
Al.
Re: Composite creates huge files
I read that article.
However, it still does not explain why i get HUGE files that fill up my 250GB disk, when i only use composite.exe to watermark JPEG images of about 100-200kb.
However, it still does not explain why i get HUGE files that fill up my 250GB disk, when i only use composite.exe to watermark JPEG images of about 100-200kb.
Re: Composite creates huge files
Lets look for a file leak. Clean up your temporary disk area of all magick-* files. Next run your composite command from a Command Prompt windows. When it complete see if there are any new magick-* files left over in your temporary disk area. If so that might indicate a bug in ImageMagick.
Re: Composite creates huge files
I tried that.
But my command in apache is:
"C:/ImageMagick/composite.exe -gravity Center -quality 60 -watermark 20.0 D:/www/************.com/public/images/logo-watermark.png - -"
And i use this command along with:
<Directory "D:\www\**********.com\public\images\stories\jreviews">
SetOutputFilter watermark
</Directory>
So there's no way to do the same from a Command Prompt box.
However, i just executed the command with 1 test JPEG file of about 150kb and the result image was generated instantly. No magick- files were created on my disk.
But my command in apache is:
"C:/ImageMagick/composite.exe -gravity Center -quality 60 -watermark 20.0 D:/www/************.com/public/images/logo-watermark.png - -"
And i use this command along with:
<Directory "D:\www\**********.com\public\images\stories\jreviews">
SetOutputFilter watermark
</Directory>
So there's no way to do the same from a Command Prompt box.
However, i just executed the command with 1 test JPEG file of about 150kb and the result image was generated instantly. No magick- files were created on my disk.
Re: Composite creates huge files
BTW,
The directory "D:\www\**********.com\public\images\stories\jreview" where i want my images to include watermark, contains 3.200 images, with total disk space 398mb.
Those are normally accessed from apache every 10 seconds or so (it's a high-traffic website)
Thanx!
The directory "D:\www\**********.com\public\images\stories\jreview" where i want my images to include watermark, contains 3.200 images, with total disk space 398mb.
Those are normally accessed from apache every 10 seconds or so (it's a high-traffic website)
Thanx!
Re: Composite creates huge files
Good, no file leak. Another possibility is that the some of your composite commands are aborting before they complete. ImageMagick captures some signals and attempts to clean up any temporary files however not all signals can be caught.
Re: Composite creates huge files
Yes actually that sounds possible.magick wrote:Good, no file leak. Another possibility is that the some of your composite commands are aborting before they complete. ImageMagick captures some signals and attempts to clean up any temporary files however not all signals can be caught.
Any idea how to solve this?
Re: Composite creates huge files
Sure, either discover the reason the composite program is aborting and fix it so the program completes and removes all its temporary files or run a periodic script that removes all temporary files that are left behind (they always start with the prefix magick-).
Re: Composite creates huge files
I found this on the apache error log:
[Fri Mar 14 01:57:19 2008] [client xxx.xx.xx.xx] mod_ext_filter (22)Invalid argument: utf8 to ucs2 conversion failed on this string: HTTP_REFERER=http://www.***********.com/component/option,com_jreviews/task,list/jr_area,ÊïõêÜêé/cat,42/Itemid,256/
[Fri Mar 14 01:57:19 2008] [error] [client xxx.xx.xx.xx] (22)Invalid argument: couldn't create child process to run `C:/ImageMagick/composite.exe', referer: http://www.*****.com/component/option,com_jreviews/task,list/jr_area,\xca\xef\xf5\xea\xdc\xea\xe9/cat,42/Itemid,256/
[Fri Mar 14 01:57:19 2008] [client xxx.xx.xx.xx] mod_ext_filter (22)Invalid argument: utf8 to ucs2 conversion failed on this string: HTTP_REFERER=http://www.***********.com/component/option,com_jreviews/task,list/jr_area,ÊïõêÜêé/cat,42/Itemid,256/
[Fri Mar 14 01:57:19 2008] [error] [client xxx.xx.xx.xx] (22)Invalid argument: couldn't create child process to run `C:/ImageMagick/composite.exe', referer: http://www.*****.com/component/option,com_jreviews/task,list/jr_area,\xca\xef\xf5\xea\xdc\xea\xe9/cat,42/Itemid,256/
Re: Composite creates huge files
Right now, i can see 4 instances of "composite.exe" on the task manager.
They wont go away, and those are probably the ones that fill up the disk.
They wont go away, and those are probably the ones that fill up the disk.
Re: Composite creates huge files
You should be able to run the task manager and kill the run away composite jobs.
Add -limit memory 16 -limit map 64 to your composite command line to ensure no one job consumes all the available memory. Also make sure you have a modern release of ImageMagick. The current version if 6.3.9-7.
Add -limit memory 16 -limit map 64 to your composite command line to ensure no one job consumes all the available memory. Also make sure you have a modern release of ImageMagick. The current version if 6.3.9-7.
Re: Composite creates huge files
No actually i can't. They don't get killed.magick wrote:You should be able to run the task manager and kill the run away composite jobs.
I do have the latest version.magick wrote: Add -limit memory 16 -limit map 64 to your composite command line to ensure no one job consumes all the available memory. Also make sure you have a modern release of ImageMagick. The current version if 6.3.9-7.
Let me try that