Issues

Select view

Select search mode

 
43 of 43

Lucee is leaving abandoned files in tomcat temp directory

Fixed

Description

Hi, we ran into an issue this week with running out of disk space on our server. I found 25GB of temp files in C:\lucee\tomcat\temp. The files are named like upload9320966950715730322.tmp

I downloaded and installed a fresh Lucee install and was able to reproduce the issue there. Any time a file is uploaded larger than 1024kb, an orphaned .tmp file gets left in the above mentioned directory. I think this will happen anytime the entire post is larger than 1024kb, I don’t think it’s specifically related to file uploads. I say that because when I look at the contents of the .tmp file, it appears to be the entire post (containing the ------WebKitFormBoundaryxg5wkakqtDQYZgAH etc.).

I believe the issue is in this file “HTTPServletRequestWrap.java”, which had a major change related to these .tmp files 17 months ago: LDEV-2087 - do not depend on "getContentLength" for file upload mode … · lucee/Lucee@e605da9 · GitHub
[LDEV-2087] - Lucee

Not only is this a maintenance/disk space issue, but I believe it has security implications as well. It leaves data sitting around in clear text that perhaps should not be.

 

https://dev.lucee.org/t/lucee-is-leaving-abandoned-files-in-tomcat-temp-directory/10478

Environment

All

Attachments

3

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Created 22 June 2022 at 14:01
Updated 17 November 2023 at 20:59
Resolved 11 July 2022 at 10:27

Activity

Show:

Ryan17 November 2023 at 20:59

This problem seems to be happening again. I received a disk space alert from one of my production servers this morning. They both have around 30GB of temp files in the C:\Lucee\Tomcat\temp directory. I am on Lucee 5.3.12.1.

I see at least two type of temp files hanging around in here. Some are named with all numbers like 1,10,100, etc. The other files are named like upload11619046740662091154.tmp.

Michael Offner11 July 2022 at 12:52

yes we could found the source of the issue and fix it, it was only happening on windows

Pothys - MitrahSoft7 July 2022 at 11:37
Edited

I've checked this ticket with the lucee latest versions 5.3.10.27-SNAPSHOT & 5.3.9.149-SNAPSHOT. Now the .tmp files in the temp folder have been deleted after the request is complete

Pothys - MitrahSoft7 July 2022 at 11:21
Edited

5.3:

5.3.9:

Ryan6 July 2022 at 16:23
Edited

For me the issue appears to be fixed in 5.3.10.27-SNAPSHOT. I can no longer reproduce it after upgrading.

With a large upload I can cause a temp file to be created, but only for a short time. When the request is completed the temp file gets deleted.

Flag notifications