"Too many open files" AND "error: can't allocate region"
Posted: 2010-02-10T02:31:33-07:00
Hi,
I am trying to create 256*256px PNG images from a 32768*32768px file.
Note: It works just great with a 8192*8192px file, so the software is really just hitting limits.
Bug #1
On Machine 1, Mac Book Pro 4GB RAM, I ran out of memory and swap quickly as "convert" required about 15GB of RAM. When switching to "-limit area 0", I quickly got this "Too many open files" errors and there does not seem to be anything I can do using "-limit files 128" or anything similar.
convert -limit area 0 -monitor sourceimage.jpg -crop 256x256 +repage png32:resultimages.png
(Updated: here is what I get precisely)
Bug #2
On Machine 2, Mac Pro with 13GB RAM, I have not monitored it but I (unexpectedly?) ran out of memory twice. The second time I used "-limit area 10gb" which did not change anything. Here is the output I get both times:
convert -monitor sourceimage.jpg -crop 256x256 +repage png32:resultimages.png
Either way, my problem needs a quick solution, so a
I have seen both bugs reported for earlier releases of IM. Right now I am running ImageMagick @6.5.9-0_0+q16 installed with MacPorts.
Thanks for your help.
I am trying to create 256*256px PNG images from a 32768*32768px file.
Note: It works just great with a 8192*8192px file, so the software is really just hitting limits.
Bug #1
On Machine 1, Mac Book Pro 4GB RAM, I ran out of memory and swap quickly as "convert" required about 15GB of RAM. When switching to "-limit area 0", I quickly got this "Too many open files" errors and there does not seem to be anything I can do using "-limit files 128" or anything similar.
convert -limit area 0 -monitor sourceimage.jpg -crop 256x256 +repage png32:resultimages.png
(Updated: here is what I get precisely)
Code: Select all
load image[map-U7ghOq]: 32767 of 32768, 100% complete
Mogrify[Image]: 2502 of 2503, 100% completeplete
convert: unable to open file `/var/folders/g5/g5EFHciNGBirywxQFvfIwU+++TI/-Tmp-/magick-sOQZSjns': Too many open files @ cache.c/ReadPixelCachePixels/4731.
On Machine 2, Mac Pro with 13GB RAM, I have not monitored it but I (unexpectedly?) ran out of memory twice. The second time I used "-limit area 10gb" which did not change anything. Here is the output I get both times:
convert -monitor sourceimage.jpg -crop 256x256 +repage png32:resultimages.png
Code: Select all
load image[map-ITLVaB]: 32767 of 32768, 100% completeete
convert(87563) malloc: *** mmap(size=524288) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
convert(87563) malloc: *** mmap(size=524288) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
convert(87563) malloc: *** mmap(size=524288) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
convert(87563) malloc: *** mmap(size=524288) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
convert(87563) malloc: *** mmap(size=524288) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
convert(87563) malloc: *** mmap(size=524288) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
convert(87563) malloc: *** mmap(size=524288) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
convert(87563) malloc: *** mmap(size=24576) failed (error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug
convert: Memory allocation failed `Cannot allocate memory' @ string.c/AcquireStringInfo/173.
Either way, my problem needs a quick solution, so a
I have seen both bugs reported for earlier releases of IM. Right now I am running ImageMagick @6.5.9-0_0+q16 installed with MacPorts.
Thanks for your help.