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>
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.
Copy link to clipboard
Copied
Sorry, forgot to mention that, this is a 64bit system.
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.
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.
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?
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.
The server encountered an internal error and was unable to complete your request.
Could not connect to JRun Server.
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.
Copy link to clipboard
Copied
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.