[
https://issues.apache.org/jira/browse/TRINIDAD-1024?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jonathan Schwehm resolved TRINIDAD-1024.
----------------------------------------
Resolution: Fixed
Fix Version/s: 1.2.2-core
Upon further review, our code never called UploadedFile.dispose(), so the bug
is on our end.
This resolves the problem we're experiencing.
> UploadedFileProcessorImpl not removing temporary files
> ------------------------------------------------------
>
> Key: TRINIDAD-1024
> URL: https://issues.apache.org/jira/browse/TRINIDAD-1024
> Project: MyFaces Trinidad
> Issue Type: Bug
> Components: Components
> Affects Versions: 1.2.2-core
> Environment: RedHat Enterprise Linux 5 (SMP Kernel 2.6.18)
> Apache Tomcat 6.0.14
> tomahawk 1.1.6
> trinidad 1.2.2
> JDK 6:
> Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
> Java HotSpot(TM) Server VM (build 1.6.0_02-b05, mixed mode)
> ~~
> Same behavior on Windows XP Pro SP2 with same Tomcat, JDK, and libraries
> Reporter: Jonathan Schwehm
> Fix For: 1.2.2-core
>
>
> We've noticed an issue with the default uploaded-file-processor on both
> Windows and Linux machines in the file upload part of our web application.
> When a user uploads a file that's larger than UPLOAD_MAX_MEMORY, the
> UploadedFileProcessorImpl creates a temporary file. If UPLOAD_TEMP_DIR is
> not specified, these files are going into
> <tomcathome>/work/Catalina/localhost/<webapp>.
> The issue is that these temporary files aren't being removed. On our Linux
> machines, they are usually removed when tomcat is stopped. On Windows, more
> often than not they continue to persist.
> When the UPLOAD_TEMP_DIR is specified, the temporary files are placed in that
> folder, but are still not deleted. I've ensured on our Linux machine that
> the temporary folder has full permissions for all and the temporary files are
> owned by the same user that runs Tomcat. We've even run Tomcat as root with
> the same results. The temporary file is created similar to this one:
> -rw-r--r-- 1 root root 857154 Mar 18 00:15 uix50712.tmp
> Here's the portion of our web.xml that configures the uploaded-file-processor:
> <context-param>
> <!-- Maximum memory per request (in bytes) -->
>
> <param-name>org.apache.myfaces.trinidad.UPLOAD_MAX_MEMORY</param-name>
> <!-- Use 500K -->
> <param-value>512000</param-value>
> </context-param>
> <context-param>
> <!-- Maximum disk space per request (in bytes) -->
>
> <param-name>org.apache.myfaces.trinidad.UPLOAD_MAX_DISK_SPACE</param-name>
> <!-- Use 5,000K -->
> <param-value>102400000</param-value>
> </context-param>
> <context-param>
>
> <param-name>org.apache.myfaces.trinidad.UPLOAD_TEMP_DIR</param-name>
> <param-value>/tmp/</param-value>
> </context-param>
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.