Solved

Coldfusion 9.0.2 jpedal temp TIFF files not removed

Posted on 2014-03-31
10
472 Views
Last Modified: 2014-04-29
We have a Windows 2003 R2 server running IIS 6, Coldfusion 9.0.2, jdk1.7.0_25. What we are seeing is there are thousands of .tif files being left behind in the windows temp folder. An example tiff file would be

c:\windows\temp\jpedal0.9518988844036744_38_HIRES_1294.tif

These tiff files are company logos that are included on every page of every invoice that gets printed. I am not too familiar with the file that creates and prints these files but this is what basically happens. There is the save content section that creates the doc to be printed. It then does a cfdocument to convert to pdf. I think it is this cfdocument tag that leaves these files behind. The cfdoc tag is

<cfdocument name="mypdfdoc"
            format="pdf"
            filename="#dir#\Invoices.pdf"
            overwrite="yes"
            fontembed="yes"
            mimeType="text/html"
            backgroundvisible="yes"
            margintop=".5"
            marginbottom=".5"
            marginleft=".5"
            marginright=".5">
            <cfoutput>#genPDFinvoice#</cfoutput>
            </cfdocument>

I see there is a CF9.0.2 Hotfix for pedal but we are using CF9.0.2. Any ideas what might be leaving these thousands of .tif files behind? Thanks in advance.
Joe
0
Comment
Question by:ckercher
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 4

Expert Comment

by:Rodrigo Munera
ID: 39967297
Seems like cfdocument makes http requests for relative resources, I don't know if this is causing the large mount of documents in the TMP folder but it would be worth giving it a try.

If you add the localURL attribute and set it to "yes", the cfdocument engine will look for the resource locally instead of issuing a http request and possibly (I don't know if this is the case) storing the image locally in the temp folder.

Source: http://www.carehart.org/blog/client/index.cfm/2011/11/19/perf_fix_via_cfdocument_localurl_attribute
0
 
LVL 16

Expert Comment

by:Gurpreet Singh Randhawa
ID: 39968555
i don't think that above will solve his issue.

what exactly does this line have

            filename="#dir#\Invoices.pdf"

i would like to see how the contents within the invoice.pdf is being used,
0
 

Author Comment

by:ckercher
ID: 39970493
I cannot post that information here but is there something in particular you would suggest I look for in the Invoices.pdf file?
0
Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

 
LVL 16

Expert Comment

by:Gurpreet Singh Randhawa
ID: 39971316
yes please check that
0
 
LVL 52

Expert Comment

by:_agx_
ID: 39983381
I think it is this cfdocument tag that leaves these files behind.

CF uses several temp directories, unfortunately I've never found a complete listing of what they are and which ones are used by which tags/functions.

A very low tech approach, but you could confirm it by running the code for a single document. Check the temp directory before and after. If any new files are added, then you know something in the cfdocument code is creating tmp files.

you would suggest I look for in the Invoices.pdf file?

Yes, check the code for any references to URL's and/or images. Also, since you're saving the result to a pdf file (not displaying it in the browser)  what is the purpose of this attribute:   mimeType="text/html"  ?
0
 

Author Comment

by:ckercher
ID: 40005016
Thanks for your suggestions. @Rodrigo, we tried the localURL which dod not make a difference as you suspected. @agx, we have not checked the code yet but it is on the list. Something I did do until this gets resolved (if it ever will) is I created a scheduled task that removes files from that temp dir older than 1 day ... at least it keeps the disk usage down. Will follow up if there is any resolution.

Joe
0
 
LVL 52

Expert Comment

by:_agx_
ID: 40005673
@ckercher - Welll code review would be a 2nd step. Try the low tech test first, since it's quick and easy ie Run <cfdocument name="mypdfdoc" ...> once. Check the number of files in the temp directory before and after. If it increases by +1, you know cfdocument is the culprit.

Like I mentioned, CF uses different directories for temp files. *Some* temp files it cleans automatically, like file uploads, charts, etc.... Though usually directories only used by CF. Could be it doesn't touch o/s temp directories, and let's the o/s clean up after itself.  If so, your solution sounds like a good workaround.
0
 

Accepted Solution

by:
ckercher earned 0 total points
ID: 40017367
Unfortunately the temp directory is constantly changing with new files being added and some files being removed so it would be difficult to monitor and know for sure that my test run created a file in the temp directory. I have decided to not pursue this further and let the scheduled task clean up the temp folder every night. Thanks for your suggestions.
0
 
LVL 52

Expert Comment

by:_agx_
ID: 40017455
Ok. Assuming they are created by CF, your solution is the best workaround I can think of anyway. Other than changing the jvm temp directory.  

(Don't forget to close out the thread by marking your comment as the answer.)
0
 

Author Closing Comment

by:ckercher
ID: 40029072
The answer is a work around, not a solution as to why the files are not being removed all of the time.
0

Featured Post

Automating Terraform w Jenkins & AWS CodeCommit

How to configure Jenkins and CodeCommit to allow users to easily create and destroy infrastructure using Terraform code.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CFGRID Custom Functionality Series -  Part 1 Hi Guys, I was once asked how it is possible to to add a hyperlink in the cfgrid and open the window to show the data. Now this is quite simple, I have to use the EXT JS library for this and I achiev…
Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question