You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by oh...@infinico.co.jp on 2006/11/14 13:50:58 UTC

Tomcat Out Of Memory

Hi

We are running Tomcat 4.1.18 on RedHat ES3 using JDK 1.4.2_02.
What is causing the error message below and What can I do to solve it?

java.lang.OutOfMemoryError
yyyy/mm/dd hh:mm:ss org.apache.tomcat.util.log.CommonLogHandler log
SEVERE: Caught exception executing org.apache.tomcat.util.net.TcpWorkerThread@160877b, terminating thread
java.lang.OutOfMemoryError


Regards



---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat Out Of Memory

Posted by Andrew Miehs <an...@2sheds.de>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Which kernel are you running? If you are running 2.4 I could imagine  
that it could be an out of process/ thread limit.
Java used to report - out of memory - even for out of processes/ 
threads problems

I think 2.4 had a default limit of 256 Process/ threads.

ulimit -a will show you how high your process limits are set.


Regards

Andrew




On 15/11/2006, at 11:14 AM, Santosh Puranshettiwar wrote:

> Gaurav Kushwaha wrote:
>> A quick fix would be to specify minimum and maximum heap size  
>> using JVM
>> parameters -Xms and -Xmx. -Xms specifies the minimum heap size and  
>> -Xmx is
>> used to determine the maximum allowed heap size.
>> So, lets say if you have enough memory to allocate 512 MB to your  
>> java
>> process you shoud write something like:
>> java -Xms512M -Xmx512M.
> Well in most cases the default heap size does good enough. In some  
> cases we may have to increase it. But in case this too doesn't  
> work, try profiling your code.
>>
>>
>> On 11/14/06, Caldarale, Charles R <Ch...@unisys.com> wrote:
>>>
>>> > From: ohashi@infinico.co.jp [mailto:ohashi@infinico.co.jp]
>>> > Subject: Tomcat Out Of Memory
>>> >
>>> > We are running Tomcat 4.1.18 on RedHat ES3 using JDK 1.4.2_02.
>>> > What is causing the error message below and What can I do to  
>>> solve it?

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFFWworW126qUNSzvURAqsyAJ4hFkVoVk5fVL9Pxl6K97cRcs1yZwCfbz+N
Uz3mssqyZM/75TSvVqU7Uak=
=75sK
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat Out Of Memory

Posted by Gaurav Kushwaha <ga...@gmail.com>.
Well... for small java programs, may be. But if you running a web
application with a decent memory requirements, more often than not you will
have to change the default heap size. Just checked it on the sun's site,
default value for maximum heap size before J2SE1.5 is 64MB which I am not
sure is good enough for most production stacks.


On 11/15/06, Santosh Puranshettiwar <sa...@wirkle.com> wrote:
>
> Gaurav Kushwaha wrote:
> > A quick fix would be to specify minimum and maximum heap size using JVM
> > parameters -Xms and -Xmx. -Xms specifies the minimum heap size and
> > -Xmx is
> > used to determine the maximum allowed heap size.
> > So, lets say if you have enough memory to allocate 512 MB to your java
> > process you shoud write something like:
> > java -Xms512M -Xmx512M.
> >
> > I think java by default doesn't expand the heap beyond a certain limit
> > and
> > that limit is pretty low so that might be the cause of your problem.
> Well in most cases the default heap size does good enough. In some cases
> we may have to increase it. But in case this too doesn't work, try
> profiling your code.
> >
> >
> > On 11/14/06, Caldarale, Charles R <Ch...@unisys.com> wrote:
> >>
> >> > From: ohashi@infinico.co.jp [mailto:ohashi@infinico.co.jp]
> >> > Subject: Tomcat Out Of Memory
> >> >
> >> > We are running Tomcat 4.1.18 on RedHat ES3 using JDK 1.4.2_02.
> >> > What is causing the error message below and What can I do to solve
> it?
> >>
> >> Start by reading the FAQ:
> >> http://tomcat.apache.org/faq/memory.html
> >>
> >> You will need to collect more information.
> >>
> >> - Chuck
> >>
> >>
> >> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE
> PROPRIETARY
> >> MATERIAL and is thus for use only by the intended recipient. If you
> >> received this in error, please contact the sender and delete the e-mail
> >> and its attachments from all computers.
> >>
> >> ---------------------------------------------------------------------
> >> To start a new topic, e-mail: users@tomcat.apache.org
> >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> >> For additional commands, e-mail: users-help@tomcat.apache.org
> >>
> >>
> >
> >
>
> --
> Santosh.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Regards,
Gaurav Singh Kushwaha
Ph: +91-9880101496
Bangalore, India.
http://www.chakpak.com

Re: Tomcat Out Of Memory

Posted by Santosh Puranshettiwar <sa...@wirkle.com>.
Gaurav Kushwaha wrote:
> A quick fix would be to specify minimum and maximum heap size using JVM
> parameters -Xms and -Xmx. -Xms specifies the minimum heap size and 
> -Xmx is
> used to determine the maximum allowed heap size.
> So, lets say if you have enough memory to allocate 512 MB to your java
> process you shoud write something like:
> java -Xms512M -Xmx512M.
>
> I think java by default doesn't expand the heap beyond a certain limit 
> and
> that limit is pretty low so that might be the cause of your problem.
Well in most cases the default heap size does good enough. In some cases 
we may have to increase it. But in case this too doesn't work, try 
profiling your code.
>
>
> On 11/14/06, Caldarale, Charles R <Ch...@unisys.com> wrote:
>>
>> > From: ohashi@infinico.co.jp [mailto:ohashi@infinico.co.jp]
>> > Subject: Tomcat Out Of Memory
>> >
>> > We are running Tomcat 4.1.18 on RedHat ES3 using JDK 1.4.2_02.
>> > What is causing the error message below and What can I do to solve it?
>>
>> Start by reading the FAQ:
>> http://tomcat.apache.org/faq/memory.html
>>
>> You will need to collect more information.
>>
>> - Chuck
>>
>>
>> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
>> MATERIAL and is thus for use only by the intended recipient. If you
>> received this in error, please contact the sender and delete the e-mail
>> and its attachments from all computers.
>>
>> ---------------------------------------------------------------------
>> To start a new topic, e-mail: users@tomcat.apache.org
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>>
>
>

-- 
Santosh.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat Out Of Memory

Posted by Gaurav Kushwaha <ga...@gmail.com>.
A quick fix would be to specify minimum and maximum heap size using JVM
parameters -Xms and -Xmx. -Xms specifies the minimum heap size and -Xmx is
used to determine the maximum allowed heap size.
So, lets say if you have enough memory to allocate 512 MB to your java
process you shoud write something like:
java -Xms512M -Xmx512M.

I think java by default doesn't expand the heap beyond a certain limit and
that limit is pretty low so that might be the cause of your problem.


On 11/14/06, Caldarale, Charles R <Ch...@unisys.com> wrote:
>
> > From: ohashi@infinico.co.jp [mailto:ohashi@infinico.co.jp]
> > Subject: Tomcat Out Of Memory
> >
> > We are running Tomcat 4.1.18 on RedHat ES3 using JDK 1.4.2_02.
> > What is causing the error message below and What can I do to solve it?
>
> Start by reading the FAQ:
> http://tomcat.apache.org/faq/memory.html
>
> You will need to collect more information.
>
> - Chuck
>
>
> THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
> MATERIAL and is thus for use only by the intended recipient. If you
> received this in error, please contact the sender and delete the e-mail
> and its attachments from all computers.
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
Gaurav Singh Kushwaha
Ph: +91-9880101496
Bangalore, India.
http://www.chakpak.com

RE: Tomcat Out Of Memory

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: ohashi@infinico.co.jp [mailto:ohashi@infinico.co.jp] 
> Subject: Tomcat Out Of Memory
> 
> We are running Tomcat 4.1.18 on RedHat ES3 using JDK 1.4.2_02.
> What is causing the error message below and What can I do to solve it?

Start by reading the FAQ:
http://tomcat.apache.org/faq/memory.html

You will need to collect more information.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org