Issue
- In our logs we see some errors apparently related to an hourly job, TempFileEntriesMessageListener
- the triggering interval of this job seems to be set in System Settings/ Documents and Media/Service/Temporary File Entries Check Interval, and it is set to 1 hour by default, but I am not sure what this job actually does.
Environment
- 7.4
Resolution
-
What does the TempFileEntriesMessageListener actually do?
To illustrate this please consider the following steps (this is just an example, such temp files can also come from other places than blogs):
-
Go to Content & Data - Blogs
-
Add a new Blogs entry
-
Drag and drop in multiple different images for the cover image
-
At this point check the DLFileEntry table (
SELECT * FROM DLFileEntry)-
Note that there are several entries all with a similar repositoryId
-
Checking the Repository table (
SELECT * FROM REPOSITORY) these file entries belong to the com.liferay.portal.kernel.util.TempFileEntryUtil repository
-
-
Publish the blog
-
Again, check the DLFileEntry table
-
Note that the last image uploaded to the blog now has a different repositoryId
-
Checking the Repository table this new entry is now associated with the com.liferay.blogs repository
-
After following these steps we now have a single image associated with the blogs entry and several images that were temporarily uploaded but ultimately never used. It is these file entries that are removed by the TempFileEntriesMessageListener.
-