How Can We Help?
Temp Folder in Tomcat - How to Clean UpTemp Folder in Tomcat - How to Clean Up
What
This KB is only relevant for self hosted clients
The temp folder on our tomcat server is filling up, and this can bring down the server, how do we handle this.
The Tomcat temp folder is used for when Pure have to process a file, the main usage is typically for the cover sheet functionality, so you should expect a lot of PDF files.
The tomcat temp folder is not the same as the temp folder used by the job PreservedContentUpdate job that moves bin files from temp folder to perm local store or external repositories.
It is quite normal that there are some activity in the Tomcat temp folder.
The temp folder should not be filling up the file system, then something strange is going on.
How
If the Tomcat temp folder is not cleaned up regularly, the disk can run out of disk space, which can cause Pure to not to be able to run.
Under normal circumstance Pure should clean up after itself in the temp folder, but we recommend self hosted customers do both monitor the disk usage for Pure in general and that you make sure to clean the Tomcat temp dir upon Tomcat restarts, as no files from the temp folder is needed after a restart. We recommend that you do this as part of the normal start and stop scripts for Tomcat.
There are 2 scenarios where we have in the past seen increases in the usage of the temp folder.
SCENARIO 1
If you see that Pure is suddenly not cleaning up after itself, usual after an upgrade or after enabling a new feature, there might be something wrong with the code in that version.
This will be seen by the temp folder seem to quickly fill up more than usual.
Pure support will then ask you:
- to confirm that you do clean up the temp dir upon tomcat restart (if you do not already, see scenario 2)
- for details on when the folder started to fill up radically, if you do not already know, this can be seen by looking at the creation dates of the files in the temp folder, if you have any information on if this matches a change in Pure version or enabling of new features, that will be a big help
- how much space is used by the temp folder right now, and by how much is it changing each day.
- for examples of the files stored in the temp folder, either the actual files, or information about the file names and sizes.
SCENARIO 2
If you are not already cleaning up the Tomcat temp folder on restarts of Tomcat, it is likely that the space used by the folder will grow over time.
This happens because Pure is stopped in the middel of working on files in the temp folder, and will not clean up the files after a restart.
In this case, we recommend that you either update your routines to in the future:
- Stop Tomcat
- Delete the files in the Tomcat temp folder manually
- Start tomcat.
or do this as part of your scripts to start/stop Tomcat to insure its not forgotten.
It is not advisable to clean up the Tomcat temp folder when Tomcat is running as the state of Pure etc. might be corrupted.
Updated at September 05, 2024