[MGNLDAM-1092] Excessive temp files Created: 13/Jan/23  Updated: 28/Apr/23  Resolved: 26/Jan/23

Status: Closed
Project: Magnolia DAM Module
Component/s: None
Affects Version/s: None
Fix Version/s: 3.0.20

Type: Bug Priority: Neutral
Reporter: Francisco Gonzalez Assignee: Miguel Martinez
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2023-01-13-15-43-47-711.png    
Issue Links:
Relates
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Release notes required:
Yes
Date of First Response:
Epic Link: AuthorX Support
Sprint: AuthX 27
Story Points: 0.5
Team: AuthorX
Work Started:

 Description   

Introduction

When opening a content that has an asset, a temporary file with extension .tmp is generated. The number of files generated is equal to the number of assets inside the content. After this, when the content is edited and saved, a new temporary file is generated and this is added to the previous one, increasing the temporary file folder in an uncontrolled way.

Some of our PaaS customers complain that the temporary files directory fills up quickly because of this.

Steps to reproduce

  1. Open a content app like "tours" and edit a content.
  2. Add a new asset (img, pdf, ...)
  3. Check the tmp folder to see the "tempFileName*.tmp" file
  4. Close the content, and check that a new tmp file has been added
  5. Open and close the same content again to see new tmp files added.

Expected results

In the assets content app, when an item is opened, a temporary file is generated and deleted when the asset is closed. 

The goal would be that the temporary files generated when editing or viewing content are deleted when the content is closed. 

Actual results

Temporary files fill the /tmp volume if it fills up before 24h which is when the cleanTempFiles job is run.

Workaround

At the moment we have PaaS customers using the cleanTempFiles job every 5 minutes.



 Comments   
Comment by Jesus Alonso [ 26/Jan/23 ]

The problem is just the temp file is deleted when the JVM exists. We can delete immediately instead.

Comment by Jesus Alonso [ 26/Jan/23 ]

Now the tempFile instead deleted immediately instead of waiting until the JVM exists.

Generated at Mon Feb 12 05:06:14 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.