commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34373] New: - Out Of Memory Exception
Date Fri, 08 Apr 2005 14:09:46 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34373>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34373

           Summary: Out Of Memory Exception
           Product: Commons
           Version: 1.0 Final
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: File Upload
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: sgrenier@triloggroup.com
                CC: sgrenier@triloggroup.com


Scenario:
Use FileUpload library in a servlet implementation for multipart request 
parsing.
Launch stress test in order to submit a lot of Post Http request with many 
parameters and file to upload.
Environment: Windows (2000 or XP) with Sun JVM or IBM JVM 1.4.x

Problem:
After few hours the server crash with an out of memory exception.
The HeapDump of the jvm at the crash time shows that a lot of memory is still 
available in the java heap.
This out of memory is due to an out of memory of the java native heap.
Sample of exception message:
[Signaling in VM: java/lang/OutOfMemoryError, message: 
JVMCI015:OutOfMemoryError, cannot create anymore threads due to memory or 
resource constraints]

Cause and solution:
The problem seems to be due to the File.deleteOnExit() call used in the 
DefaultFileItem class.
This call is used in order to delete temporary file at the exit of the JVM.
This call seems to create memory leak in native heap on Windows OS (We didn't 
test it on Linux or Unix)
Moreover this is not usefull to let file destruction on exit of the jvm on a 
server.
In order to delete temporary file created by DefaultFileItem, a cleanup method 
should be added,
or a cleanup of the temporary files should be provided, but not the 
File.deleteOnExit() method.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message