Skip to main content
Inspiring
March 18, 2010
Question

images to pdf gc overhead exceeded

  • March 18, 2010
  • 2 replies
  • 1357 views

I have an application that collects uploaded images. This part works fine. I need to also be able to take all those images and send them to a pdf file but the page does not load and gives a GC java overhead limit exceeded, after several minutes. What can I do to help this? I have gone in and increased the Maximum JVM Heap Size from the default of 512mb to 2048mb but still does not seem to help, although it does seem like it takes longer to time out or it gives a pdf corrupted error message.

This is CF8 on RH5

Here is the code I am using, pretty simple but not sure if there is a better way.

<cfquery name="getall" datasource="#dsn#">
Select imagepath
from tradition
</cfquery>

<body >
<cfdocument format="pdf" pagetype="letter">
<cfoutput query="getall">#getall.imagepath#<br /><br /><br />
<img src="../uploads/#getall.imagepath#">
<cfdocumentitem type="pagebreak"></cfdocumentitem>
</cfoutput></cfdocument>
</body>
</html>

This topic has been closed for replies.

2 replies

ilssac
Inspiring
March 18, 2010

The next obvious question is how many images and how large are they in this directory.  If any of them are full RAW format images, you could be exceeding that memory limit with a single image.  But with even more compressed formats it doesn't take many large images to full up a gig or two of memory.

rmorganAuthor
Inspiring
March 18, 2010

The total size of all the images is 28.1mb in 58 files. The individual file sizes range from 6kb to 2449kb. All are jpg and bmp, but only a few bmps. There were also some eps files but I converted them to jpg as part of my troubleshooting process.

EDIT:

Also, I have a grid so that I can open them up individually into a pdf file and doing so one at a time works fine. Although the 1meg+ size files do take a considerable amount of time to load.

ilssac
Inspiring
March 18, 2010

What happens if you do that without the <cfdocument...> tag?  That should create a webpage with all those images.  Can the systems handle that?

ilssac
Inspiring
March 18, 2010

rmorgan wrote:

I have gone in and increased the Maximum JVM Heap Size from the default of 512mb to 2048mb


Since, apparently, CF started after you did this I would assume this is true, but to double check.  Is this a 64bit version of ColdFusion?  With a 32bit CF you can't have a JVM that large, that pratical limit for 32bit is about 1.4 GB.

rmorganAuthor
Inspiring
March 18, 2010

Sorry, forgot to mention that, this is a 64bit system.