>>Hi,
>>
>>I am using the Tomcat server. If the tomcat server is started 64 Mb of
>>memory is allocated (which seems to be default). I use an upload jsp file
>>through which I will be able to upload big files (perhaps 100Mb or more).
I
>>changed the tomcat.bat file by adding the java -Xmx100m piece (which
should
>>allocate 100Mb of memory for the jvm). But this is not working. I am
getting
>>an OutOfMemory error when I am uploading a file which is bigger than 50
Mb.
>>
>
>I believe that the JVM *is* working as expected.  The problem is working
>with a single object that's larger than 50% of the free space in the heap.
>This will make some garbage collectors very unhappy, when they need to
>move stuff around.  You may succeed using a different JVM or even bigger
>-mx, but you should really change your code -- loading a 50-megger to
>memory in a single chunk is insane (for a single upload, anyway).
>


Instead of loading the entire file into memory, or uploading it in pieces,
you might want to try streaming the file directly to your hard drive.

Jason B.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to