• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

images to pdf gc overhead exceeded

Explorer ,
Mar 18, 2010 Mar 18, 2010

Copy link to clipboard

Copied

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>

TOPICS
Advanced techniques

Views

976

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 18, 2010 Mar 18, 2010

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 18, 2010 Mar 18, 2010

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 18, 2010 Mar 18, 2010

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 18, 2010 Mar 18, 2010

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 18, 2010 Mar 18, 2010

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 18, 2010 Mar 18, 2010

Copy link to clipboard

Copied

I got a new message this time when not using the cfdocument tag. Opening one by one still works. It also takes at least 10 minutes to time out.

Server Error

The server encountered an internal error and was unable to complete your request.

Could not connect to JRun Server.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 18, 2010 Mar 18, 2010

Copy link to clipboard

Copied

You may be dealing with a request time out issue.  That is 30 seconds by default.  It can be overridding with a <cfsetting requestTimeOut="seconds"> tag on a CFML file that is expected to take longer to process.

I would also try different size batches to see where the limit seems to be.  Can you do 5 files, 10, 15 etc.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 18, 2010 Mar 18, 2010

Copy link to clipboard

Copied

LATEST

I take that back, without the cfdocument tag it does output correctly. I had an operator error to get the cant connect to jrun server.

I also resized all the images to below 1mb and it seems to work but still slow as molassas.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation