Coldfusion 9.0.2 jpedal temp TIFF files not removed

Posted on 2014-03-31
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


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"

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.
Question by:ckercher
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

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.

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


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

Author Comment

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?
Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

LVL 16

Expert Comment

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

Expert Comment

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"  ?

Author Comment

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.

LVL 52

Expert Comment

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.

Accepted Solution

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.
LVL 52

Expert Comment

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.)

Author Closing Comment

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

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Today, I was working on some optimization and spam-stopping techniques when I encountered Ben Nadel's post to reduce spam feature using Math ( While this method is not o…
This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL ( and MongoDB (…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

729 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