Does Alfresco have a job for cleanup tomcat/temp files?

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Active Member II

Does Alfresco have a job for cleanup tomcat/temp files?

Jump to solution

Does Alfresco have a job for cleanup tomcat/temp files?

1 Solution

Accepted Solutions
Highlighted
Master

Re: Does Alfresco have a job for cleanup tomcat/temp files?

Jump to solution

Alfresco Repository has a job that cleans temporary files that have been created using an Alfresco-specific API (TempFileProvider) for temporary files. This will affect only files in tomcat/temp/Alfresco. The job runs every 60 minutes and cleans all files that are 60 minutes or older. In the worst case, a temporary file may remain there for up to 119 minutes.

Other temporary files are not cleaned up by Alfresco.

View solution in original post

7 Replies
Highlighted
Master

Re: Does Alfresco have a job for cleanup tomcat/temp files?

Jump to solution

Alfresco Repository has a job that cleans temporary files that have been created using an Alfresco-specific API (TempFileProvider) for temporary files. This will affect only files in tomcat/temp/Alfresco. The job runs every 60 minutes and cleans all files that are 60 minutes or older. In the worst case, a temporary file may remain there for up to 119 minutes.

Other temporary files are not cleaned up by Alfresco.

View solution in original post

Highlighted
Established Member

Re: Does Alfresco have a job for cleanup tomcat/temp files?

Jump to solution

TempFileProvider also allows the creation of "long life folders" that are deleted by default after 24 hours

Active Member II

Re: Does Alfresco have a job for cleanup tomcat/temp files?

Jump to solution

Can I configure this provider?

Highlighted
Established Member

Re: Does Alfresco have a job for cleanup tomcat/temp files?

Jump to solution

Yes,

TempFileProvider is part of alfresco-core (which is not a good name btw for utility classes), that has a inner class defining the Scheduled Job that handles temp files lifecycle. This Job is registered in scheduled-jobs-context.xml so you can override tempFileCleanerTrigger bean to configure it or even change the implementation if you need (sadly, long life folders are not handled by a cronExpression).

Highlighted
Master

Re: Does Alfresco have a job for cleanup tomcat/temp files?

Jump to solution

No, the provider is a static utility without configuration. The only thing you can technically configure is the cleanup process, though there are no reasonable configuration properties you can set via alfresco-global.properties. You'd have to override the default Spring bean definition to change how often the job runs. The long life keep alive is hard-coded, and for the regular temporary file you can only configure the protectHours, e.g. you cannot go below 60 minutes.

Highlighted
Master

Re: Does Alfresco have a job for cleanup tomcat/temp files?

Jump to solution

Yeay - answering at the same time. Though my answer starts with the opposite to "Yes", both responses cover the same aspects...

Highlighted
Established Member

Re: Does Alfresco have a job for cleanup tomcat/temp files?

Jump to solution

 I guess you understood better the meaning of "Can I configure?"