You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by kjiang <kj...@harmonyairways.com> on 2005/01/06 22:18:48 UTC

java.lang.OutOfMemoryError Tomcat4.1.30

Hi
When tomcat (version 4.1.30) read in a large file,
java.lang.OutOfMemoryError occurred, what can I do for this issue.
 
Thanks
 
Kelvin jiang


RE: java.lang.OutOfMemoryError Tomcat4.1.30

Posted by Mike Jackson <mj...@cdi-hq.com>.
Either don't read so large a file into memory (ie read chunks and
process them rather than the entire file) or increase the memory that
Tomcat can use.  You can increase the memory allowed to the VM using
the -X arguements (java -X for help).  The one you'll want is going to
be -Xmx###M where the ### should be the amount of memory you want to
allocate.  Generally for production servers I typically allow tomcat
at least 256 megs of ram using the option "-Xmx256M".

--mikej
-=-----
mike jackson
mjackson@cdi-hq.com

> -----Original Message-----
> From: kjiang [mailto:kjiang@harmonyairways.com] 
> Sent: Thursday, January 06, 2005 1:19 PM
> To: tomcat-user@jakarta.apache.org
> Subject: java.lang.OutOfMemoryError Tomcat4.1.30
> 
> 
> Hi
> When tomcat (version 4.1.30) read in a large file, 
> java.lang.OutOfMemoryError occurred, what can I do for this issue.
>  
> Thanks
>  
> Kelvin jiang
> 
> 



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