[MNT-16407] (Win2012)Temp Files created in <Alfresco-Home>\tomcat\temp are not deleted Created: 14-Jun-16  Updated: 14-May-18  Resolved: 09-Aug-16

Status: Closed
Project: Service Packs and Hot Fixes
Component/s: ACS REST API, Repository, Web Scripts and Surf
Affects Version/s: 5.0, 5.1
Fix Version/s: 5.0.4, 5.1.2, 5.2.3

Type: Service Pack Request
Reporter: Kavitha Prakash [X] (Inactive) Assignee: Closed Bugs (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: 0 minutes
Time Spent: 1 week, 3 days, 7 hours, 50 minutes
Original Estimate: Not Specified

Alf One v5.0.N/v5.1.N, Windows 2012, postgresql

Attachments: Text File mnt-16407_50N.patch     Text File mnt-16407_PLAT_52n.patch     Text File mnt-MNT-16407_Core.patch    
Issue Links:
is duplicated by MNT-19052 The tomcat/temp folder fills up with ... Open
relates to ALF-2363 Temporary files are not deleted from ... Closed
Bug Priority:
Category 1
ACT Numbers:


Build Location: https://releases.alfresco.com/Enterprise-5.0/5.0.4/build-00030/ALL/


Problem Description
Uploading large videos to a Share site, creates temp files (apache-tika-xxxxxxxx.tmp) as large as the videos. Alfresco running on Windows is unable to clean up these temp files
and they occupy a large amount of space. Alfresco running on Linux does not have
this problem.

Steps to Reproduce
1) Using a windows installation of Alfresco, upload an mp4 video file in a Share site.
A temp file (apache-tika-xxxxxxxx.tmp) of the same size of the uploaded video is created in C:\Alfresco\tomcat\temp directory

2) This tmp file is never cleaned up.

Expected Behaviour
Apache tika temp file gets deleted automatically at some point or when the tempFileCleaner job is run

Actual Behaviour
Apache tika temp file remains in C:\Alfresco\tomcat\temp directory

Tried changing the properties of the Windows Tomcat Service to log on as a Windows user
rather than the default System user, however this did not make any difference.

Delete the files manually
Change the location of the temp directory using java.io.tmpdir in alfresco-global properties, so that a larger volume can be used.

Comment by Jennie Soria [X] (Inactive) [ 11-Jul-16 ]

Test Scenario

  • install v5.0.0.15, v5.0.3.5, v5.1 Alfresco One on both Windows 2012, MacOSX (linux)
  • create folder under ‘Company Home (repository) > Blackhole > Videos’
  • DND/or upload 1-N MP4 videos (use same videos in all environment/install tests)
  • monitor <installdir>/tomcat/temp directory and subdirectories during uploads
  • wait >1 hour
  • trigger manually via jconsole tempFileCleanerTrigger: MBeans > Alfresco > Schedule > DEFAULT > MonitoredCronTrigger > tempFileCleanerTrigger > Operations > executeNow()


  • on upload MP4 files into Win 2012 or non-windows environments ‘very’ temporary files are created in <installdir>/tomcat/temp path comprised of ‘apache-tika-#####.tmp’ and ‘upload_######000###.tmp’, also files are generated under <installdir>/tomcat/temp/Alfresco comprised of ‘streamcontent#######_0000####.png’
  • almost instantly the files located under <installdir>/tomcat/temp in the non-windows environment are cleared
  • in rare cases in both environments the <installdir>/tomcat/temp/upload_######_000###.tmp file stays, eventually will clear (likely once it has been indexed or no longer is needed)
  • in Windows 2012 environment ONLY the files under <installdir>/tomcat/temp never clear, not the apache-tika* nor the upload-* files.
  • trigger of the ‘tempFileCleanerTrigger’ only clears files under <installdir>/tomcat/temp/Alfresco if the file is >1 hour old


  • accumulation of <installdir>/tomcat/temp directory on Windows installs, extremely problematic especially with files using apache tika (i.e. video files)


  • manual deletion of accumulated files in <installdir>/tomcat/temp, issue is determining if files still in use before manual deletion and impact
Generated at Sun Oct 25 11:47:19 GMT 2020 using Jira 7.13.15#713015-sha1:7c5ddd2c3e1709974ae9c48c17df8edd3919fe2c.