Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Our web application converts pdf to png using ghostscript. Recently, a huge, over 60GB, temporary files was created on /tmp directory. Load average raised up to 18 near the time when this file was created. I'm completely lost on this, and would really appreciate any help. Thank you!

Detail:

  • Ghostscript version is 8.70
  • OS is Red Hat Enterprise Linux Server 5.2 (Tikanga)
  • PDF file as input existed on file server. File size is about 150MB, 2 pages, 445.8 x 323.2 mm, PDF 1.6 (Acrobat 7.x)
  • A problem of nfs occurred almost at the same time the file was created.
  • I can't know which is the root cause: file size, file content, or problem of nfs.
  • Content of /tmp when the file was created is:

    ls -lh /tmp
    ...
    -rw------- 1 apache apache 39K Jan 21 17:29 gs_eNsUng
    -rw------- 1 apache apache 66G Jan 29 12:12 gs_GamtbA
    ...
    
  • The application executes command such as:

    gs \
    -dSAFER \-dBATCH \
    -dNOPAUSE \
    -sDEVICE=png48 \
    -dTextAlphaBits=4 \
    -dGraphicsAlphaBits=4 \
    -dMaxStripSize=8192 \
    -dUseCropBox \
    -sOutputFile=[path of output image file] \
    [path of input pdf file]
    
share|improve this question

migrated from stackoverflow.com Jan 31 '13 at 21:59

This question came from our site for professional and enthusiast programmers.

2 Answers 2

up vote 1 down vote accepted

First, 8.70 is ANCIENT. Our most recent release (last August) was 9.06 and 9.07 release candidate is out and 9.07 is expected early Feb. (barring complications).

http://www.ghostscript.com/~chrisl/ghostscript-9.07rc1.tgz http://www.ghostscript.com/~chrisl/ghostpdl-9.07rc1.tgz

http://www.ghostscript.com/~chrisl/MD5SUM http://www.ghostscript.com/~chrisl/SHA1SUM

(ChrisL is our release coordinator).

-dMaxStripSize=_ is only used for tiff devices, not png* (but it is not a problem)

Sometimes -dBufferSpace=32000000 (default is 4000000) will reduce the clist size a bit. More likely this was a bug that has been fixed. Please retest with current code.

If this persists with newer code, we (Artifex) would need the file. In that case, please open a bug at http://bugs.ghostscript.com

share|improve this answer

I'm having the same problem using Ghostscript 9.05, and I found the following bug: http://bugs.ghostscript.com/show_bug.cgi?id=693121 which is written for Ghostscript not clearing its temporary files when it terminates abnormally.

Our application converts PDF to JPG and sometimes end-users will throw us PDFs that are not handled well by Ghostscript, so we time the process and kill it if it takes longer than a set time. It sounds like we need to also find and remove the temporary file in this situation until this bug is fixed.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.