Please compare 'ulimit -a' on both machines.
Any differences regarding data/memory/stack?
Main Topics
Browse All TopicsI have two similar servers with centos 5. One is a development server one production. both use standard packages manged with yum. I would like to continue using standard packages
the convert command is behaving behaving differently between the servers. the production server gives me a memory allocation error while converting monochrome tif to pdf.
the dev server the one that works has 1 gig of memory
the production server has 4 gig
convert test.tif test.pdf
convert: Memory allocation failed `test.pdf'.
the command works with smaller images. the images I want to convert are monochrome scans of documents. group4 compression
I did try passing some options to convert which seemed to make not difference, also it is not unnecessary on the dev system. the dev system does create a monochrome compressed pdf without passing any options
convert test.tif -monochrome -compress Group4 -quality 100 -units PixelsPerInch -density 600 test2.pdf
Am I missing some package that conversion to pdf uses?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Here an example of a file that will not convert to pdf. with convert:
$ convert ./test.tif ./test.pdf
convert: Memory allocation failed `./test.pdf'.
http://train.repin.net/tes
The TiffInfo for that file is ...
TIFF Directory at offset 0x12c4 (4804)
Image Width: 2528 Image Length: 3280
Resolution: 118.292, 118.292 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 4
Photometric Interpretation: min-is-white
FillOrder: msb-to-lsb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 3280
Planar Configuration: single image plane
DocumentName: /var/crev/convert/sp/20090
Software: ImageMagick 6.2.8 04/17/08 Q16 file:/usr/share/ImageMagic
This is a tiff from our fax server
TIFF Directory at offset 0x1101a (69658)
Subfile Type: (0 = 0x0)
Image Width: 1728 Image Length: 2292
Resolution: 204, 196 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 4
Photometric Interpretation: min-is-white
Samples/Pixel: 1
Rows/Strip: 2292
Planar Configuration: single image plane
And after I play with it to add banners ...
TIFF Directory at offset 0x12e12 (77330)
Image Width: 1728 Image Length: 2492
Resolution: 204, 196 pixels/inch
Bits/Sample: 1
Compression Scheme: CCITT Group 4
Photometric Interpretation: min-is-white
FillOrder: msb-to-lsb
Orientation: row 0 top, col 0 lhs
Samples/Pixel: 1
Rows/Strip: 2492
Planar Configuration: single image plane
DocumentName: Z:\Faxes\Received\2009\06\
Software: ImageMagick 6.4.6 2008-11-25 Q8 http://www.imagemagick.org
I managed to convert my Z:\Faxes\Received\2009\06\
And here is your test.pdf
when I run "ulimit -a" I see a difference in the "pending signals" and "max user processes".
development system:
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
max nice (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 38912
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
max rt priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 38912
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Production System:
$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
max nice (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 8120
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
max rt priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 8120
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
thanks for you help RQuadling
It is very strange. the cmand you use works fin on the Developmetn server but not on the production server.
Production:
$ convert test.tif -monochrome -compress Group4 -quality 100 -units PixelsPerInch -density 600 test.pdf
convert: Memory allocation failed `test.pdf'.
Also tiff2pdf does work on productions server. however at first glance it does not seem to allow you to create a multi page pdf from multiple single page tiff files. This in one thing I am doing with convert on the dev server. I will look into this option more.
As for upgrading ImageMagick. I was hoping to make this all work on a vanilla centos5 server. centos5 packages include ImageMagick 6.2.8. The advantage to not upgrading is we can continue to manage the os with standard packages. also, what is really bugging me is that it works on the other sever with the same version.
RQuadling,
I'm not convinced it is an issue with the version. it is working using same version on a different machine.
The single page tiff images are tagged with imagesMagick because I am converting them from huge multi page tiff files into single page tiff files. I'm doing this because the multi page tiffs are unruly to work with. The files that come to me are sometimes over 20 meg over 500pages containing mixed documents. I convert them to single pages then figure out which pages go with each document. some are single page documents. some are multiple pages. then I hope to create separate pdfs for each document which are often 2-5 pages long.
I would look into tiffsplit and tiff2pdf. Significantly faster the convert and way less memory. Even on windows.
OOI. Are you sure both packages are the same? I'm not a unix person, but having seen the way that options are specified to configure/make/install things, it seems likely a small difference is enough to make things work/not work.
If the 2 machines are physically identical, does it stand to reason that you could use the binary from the working machine?
If so, so if that works. It may be that the build process detected some difference and pushed that into the build process.
Thank you very much for all your help with this Problem. Although I never figured out the specific problem of convert running on one server but not the other, you provided better alternatives. Since I'm not doing any kind of compresion, size, resolution, etc conversion here I don't need convert.
I am now using tiffsplit to separate big multi-page. tiffcp to join them back into smaller docs. then tiff2pdf to create a downloadable doc for the user. This is much faster than convert.
I'll post some code here when I am done with it.
Business Accounts
Answer for Membership
by: ozoPosted on 2009-07-05 at 23:17:15ID: 24782949
Are there any other differences between the production and dev servers?
can you post the test.tif file?