convert command killed by OS (Googled before)

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
WizarD
Posts: 6
Joined: 2013-04-02T05:52:37-07:00
Authentication code: 6789

convert command killed by OS (Googled before)

Post by WizarD »

Hi all.
Server: Amazon small instance
Free mem: 494728k
source file:
identify source.jpg
source.jpg JPEG 620x620 620x620+0+0 8-bit DirectClass 43.1kb
Version: ImageMagick 6.5.4-7 2012-05-09 Q16 OpenMP http://www.imagemagick.org

Command: convert -limit memory 300MB -limit area 0 source.jpg -crop 5x5 'image-%d.jpg'
Process killed.
Why ?
I read
http://www.imagemagick.org/script/architecture.php
And now I do not know what i must do ?
;(
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert command killed by OS (Googled before)

Post by magick »

The OS is killing your process because its consuming to much memory. Reduce your memory requirements:
  • convert -limit memory 2MB ...
if that fails, force the pixel cache to disk:
  • convert -limit memory 2MB -limit map 4mb ...
If that fails, reduce the memory /map limits to 1MB / 2MB.
WizarD
Posts: 6
Joined: 2013-04-02T05:52:37-07:00
Authentication code: 6789

Re: convert command killed by OS (Googled before)

Post by WizarD »

I read before about it.
ANd you can see in my command
-limit memory 300MB
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert command killed by OS (Googled before)

Post by magick »

Did you try 2MB instead of 300MB like we advised? If so, what happened? Did it work?
WizarD
Posts: 6
Joined: 2013-04-02T05:52:37-07:00
Authentication code: 6789

Re: convert command killed by OS (Googled before)

Post by WizarD »

Exuse me for long AFK.

command: convert -limit memory 2MB -limit map 4MB __.jpg -crop 5x5 'image-%d.jpg'
results: process killed

command: convert -limit memory 1MB -limit map 2MB __.jpg -crop 5x5 'image-%d.jpg'
results: process killed
WizarD
Posts: 6
Joined: 2013-04-02T05:52:37-07:00
Authentication code: 6789

Re: convert command killed by OS (Googled before)

Post by WizarD »

i have only 494728k free mem.
command top show it
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert command killed by OS (Googled before)

Post by magick »

Set '-limit memory 0 -limit map 0'. If that fails, you'll need a larger instance of a Amazon server to run ImageMagick.
WizarD
Posts: 6
Joined: 2013-04-02T05:52:37-07:00
Authentication code: 6789

Re: convert command killed by OS (Googled before)

Post by WizarD »

-limit memory 0 -limit map 0 - same.

its very strange - spliting 620x620 image require > 300mb memory
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert command killed by OS (Googled before)

Post by magick »

You may be running the Q16 (16-bits per pixel) version of ImageMagick, check with 'convert -version'. The Q8 (8-bits per pixel) version uses 1/2 the amount of memory as compared to the Q16 version.
WizarD
Posts: 6
Joined: 2013-04-02T05:52:37-07:00
Authentication code: 6789

Re: convert command killed by OS (Googled before)

Post by WizarD »

Yeah ..you right.
Version: ImageMagick 6.5.4-7 2012-05-09 Q16 OpenMP http://www.imagemagick.org
Copyright: Copyright (C) 1999-2009 ImageMagick Studio LLC
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: convert command killed by OS (Googled before)

Post by magick »

One last thing, ImageMagick runs well on the iPhone and Android devices. Your Amazon instance must be severely constrained.
Post Reply