Page 1 of 1

convert command killed by OS (Googled before)

Posted: 2013-04-02T06:03:42-07:00
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 ?
;(

Re: convert command killed by OS (Googled before)

Posted: 2013-04-02T06:27:11-07:00
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.

Re: convert command killed by OS (Googled before)

Posted: 2013-04-02T07:55:56-07:00
by WizarD
I read before about it.
ANd you can see in my command
-limit memory 300MB

Re: convert command killed by OS (Googled before)

Posted: 2013-04-02T10:48:30-07:00
by magick
Did you try 2MB instead of 300MB like we advised? If so, what happened? Did it work?

Re: convert command killed by OS (Googled before)

Posted: 2013-04-03T03:39:58-07:00
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

Re: convert command killed by OS (Googled before)

Posted: 2013-04-03T03:41:22-07:00
by WizarD
i have only 494728k free mem.
command top show it

Re: convert command killed by OS (Googled before)

Posted: 2013-04-03T05:00:03-07:00
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.

Re: convert command killed by OS (Googled before)

Posted: 2013-04-03T05:32:58-07:00
by WizarD
-limit memory 0 -limit map 0 - same.

its very strange - spliting 620x620 image require > 300mb memory

Re: convert command killed by OS (Googled before)

Posted: 2013-04-03T05:40:17-07:00
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.

Re: convert command killed by OS (Googled before)

Posted: 2013-04-03T06:23:20-07:00
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

Re: convert command killed by OS (Googled before)

Posted: 2013-04-03T06:40:55-07:00
by magick
One last thing, ImageMagick runs well on the iPhone and Android devices. Your Amazon instance must be severely constrained.