Cause of many files in Tomcat's temp directory

1

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
51078
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 months 1 week ago

2 Answers:

0

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
4728
Joined: Sep 13 2011 - 8:04am
Last seen: 1 year 2 weeks ago
0

Thanks marianol,

That's what I thought. Just wanted confirmation.

 

hozawa's picture
51078
Joined: Apr 24 2010 - 4:31pm
Last seen: 4 months 1 week ago
Feedback
randomness