Cause of many files in Tomcat's temp directory

Sometimes, many files with name starting with "virt" are created in Tomcat's temp directory where JasperReports Server is installed.

In the following page, the cause of the problem is stated as being JRE and not JasperReports but I haven't had other Java programs create temp files without explicit statements.

http://community.jaspersoft.com/wiki/answers-most-common-questions-regar...

Doing a grep on JasperReports source code seems to indicate JasperReports is creating some temp files.

e.g.

file = File.createTempFile("file.buff.os.", ".tmp");  // FileBufferedOutputStream

private String directory = System.getProperty("java.io.tmpdir");   // Virtualizer code

Following case seems to suggest JasperReports creates temp files when it can not find font files but I'm not sure if this will create a file name starting with "virt"..

http://community.jaspersoft.com/jasperreports-library/issues/3005-1

So, are the temp files created by JRE or by JasperReports? How can I prevent this from happening because I have to shut down JasperReports Server to delete these files and it takes over an hour to delete them.

 

hozawa's picture
190283
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 years 3 months ago

2 Answers:

Hi @hozawa,

Those files you see are the JR temp files used by the JR Virtualizer if you have a huge anout of files may be because of this: http://community.jaspersoft.com/wiki/large-amount-temp-files-slows-down-...

or it just may be that you have a very busy server and the JVM does not do a good job in cleaning the temp files, in that case you can put a cron job that deletes the files on a regular basis.

marianol's picture
17628
Joined: Sep 13 2011 - 8:04am
Last seen: 4 years 11 months ago

Thanks marianol,

That's what I thought. Just wanted confirmation.

 

hozawa's picture
190283
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 years 3 months ago
Feedback