You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by jill han <jh...@bynum.com> on 2006/12/18 21:41:50 UTC

java.lang.OutOfMemoryError

What could cause java.lang.OutOfMemoryError ?
The application is built on turbine/torque/velocity.

Thanks in advance

Jill


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


Re: java.lang.OutOfMemoryError

Posted by AFrieze <AF...@simmgene.com>.
jill han wrote:
> What could cause java.lang.OutOfMemoryError ?
> The application is built on turbine/torque/velocity.
>
> Thanks in advance
>
> Jill
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>
>   
Jill

I have encountered this problem in several different situations. Are you 
querying a database and/or dealing with large amounts of XML data?
If the problem is space related, you should probably increase the amount 
of memory java can use.

Example) If you are using linux as your O/S and tomcat as your server, 
you could add this line to your Catalina.sh file.

export JAVA_OPTS=${JAVA_OPTS}'-Xmx512m -Xms128m'

Hope this helps
AFrieze

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


Re: java.lang.OutOfMemoryError

Posted by Joe Carter <jo...@excite.com>.
For the latest versions of 1.4.2 (_10 and up) and 5/6 there is a very
useful utility called jmap -
http://java.sun.com/j2se/1.5.0/docs/tooldocs/share/jmap.html
that's built into the Java SDK. This dumps out all the objects in the heap.
Doesn't work under windows though..

Joe

On 30/12/06, Thomas Fischer <tf...@apache.org> wrote:
>
> An out of memory error is typically very difficult to pinpoint. The place
> where this error occurs is typically not connected to the place where the
> problem sits. Personally, I know of two ways of dealing with this
> - you can have an idea what happens. The answers before have provided
> situations where OutOfMemory-Problems typically happen.
> - If you think that none of the typical causes apply to you, you have to
> find out the hard way. To get an idea of the cause of the problem, create
> a heap dump of the virtual machine just after an OutOfMemory-Error occured
> (on linux, this is done by using the "kill -3" command on the appropriate
> process). Then, scan through the heap dump to see which objects occur most
> often. These are usually the objects which are not dereferenced and cause
> the memory overflow. Then go through the code and find out where these
> objects are created, and why they are not thrown away after being used.
> You might need more information out of the heap dump than just the class
> names of the relevant object; there are tools showing the refences out of
> heap dumps but I never used one myself.
>
>     Hope this helps,
>
>           Thomas
>
> On Mon, 18 Dec 2006, jill han wrote:
>
> > What could cause java.lang.OutOfMemoryError ?
> > The application is built on turbine/torque/velocity.
> >
> > Thanks in advance
> >
> > Jill
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>

Re: java.lang.OutOfMemoryError

Posted by Thomas Fischer <tf...@apache.org>.
An out of memory error is typically very difficult to pinpoint. The place 
where this error occurs is typically not connected to the place where the 
problem sits. Personally, I know of two ways of dealing with this
- you can have an idea what happens. The answers before have provided 
situations where OutOfMemory-Problems typically happen.
- If you think that none of the typical causes apply to you, you have to 
find out the hard way. To get an idea of the cause of the problem, create 
a heap dump of the virtual machine just after an OutOfMemory-Error occured 
(on linux, this is done by using the "kill -3" command on the appropriate 
process). Then, scan through the heap dump to see which objects occur most 
often. These are usually the objects which are not dereferenced and cause 
the memory overflow. Then go through the code and find out where these 
objects are created, and why they are not thrown away after being used.
You might need more information out of the heap dump than just the class 
names of the relevant object; there are tools showing the refences out of 
heap dumps but I never used one myself.

    Hope this helps,

          Thomas

On Mon, 18 Dec 2006, jill han wrote:

> What could cause java.lang.OutOfMemoryError ?
> The application is built on turbine/torque/velocity.
>
> Thanks in advance
>
> Jill
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>

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


Re: java.lang.OutOfMemoryError

Posted by Will Glass-Husain <wg...@forio.com>.
Lots of things.  I find the default Java Heap memory settings in Java
to be inadequate for a typical webapp.

Are you familiar with the -Xmx setting?

Have you read this?
http://tomcat.apache.org/faq/memory.html

WILL

On 12/18/06, adam.s.allgaier@exxonmobil.com
<ad...@exxonmobil.com> wrote:
> I've had this error occur when I'm continously making changes to my app,
> and the app server is re-compiling jsps and classes.  Restarting the app
> server has resolved this for me.
>
> Your cause may be very different.  :-)
>
> Thank you,
> Adam
>
>
>
>
>              "jill han"
>              <jhan@bynum.co
>              m>                                                         To
>                                       "Turbine Users List"
>                                       <tu...@jakarta.apache.org>,
>              12/18/06 02:41           "Apache Torque Users List"
>              PM                       <to...@db.apache.org>,
>                                       "Velocity Users List"
>                                       <ve...@jakarta.apache.org>
>              Please respond                                             cc
>                    to
>              "Apache Torque                                        Subject
>               Users List"             java.lang.OutOfMemoryError
>              <torque-user@d
>              b.apache.org>
>
>
>
>
>
>
>
>
> What could cause java.lang.OutOfMemoryError ?
> The application is built on turbine/torque/velocity.
>
> Thanks in advance
>
> Jill
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>


-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com

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


RE: java.lang.OutOfMemoryError

Posted by Inandjo Taurel <in...@hotmail.com>.
Hi Jill,

generally the outofmemory error occurs when the memory allocated to your JVM 
is not enough.
There are two ways you can address this problem:
- you increase the size of the heap for your JVM.
- you reengineer the part of your code that makes your JVM to crash.
In order for us to respond more precisely and help you with your issue, you 
need to tell us EXACTELY when the outofmemory error occurs.



>From: "jill han" <jh...@bynum.com>
>Reply-To: "Turbine Users List" <tu...@jakarta.apache.org>
>To: "Turbine Users List" <tu...@jakarta.apache.org>,"Apache Torque 
>Users List" <to...@db.apache.org>,"Velocity Users List" 
><ve...@jakarta.apache.org>
>Subject: java.lang.OutOfMemoryError
>Date: Mon, 18 Dec 2006 14:41:50 -0600
>MIME-Version: 1.0
>Received: from mail.apache.org ([140.211.11.2]) by 
>bay0-mc6-f11.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Mon, 
>18 Dec 2006 12:47:07 -0800
>Received: (qmail 68175 invoked by uid 500); 18 Dec 2006 20:47:10 -0000
>Received: (qmail 68116 invoked by uid 99); 18 Dec 2006 20:47:10 -0000
>Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133)    
>by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Dec 2006 12:47:10 -0800
>Received: pass (herse.apache.org: local policy)
>Received: from [64.79.231.74] (HELO blr02.bynum.com) (64.79.231.74)    by 
>apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Dec 2006 12:47:00 -0800
>X-Message-Info: LsUYwwHHNt0nWsLy2dNO2hT4R8km7NfdDo1mWo8Xc4Y=
>Mailing-List: contact turbine-user-help@jakarta.apache.org; run by ezmlm
>Precedence: bulk
>List-Unsubscribe: <ma...@jakarta.apache.org>
>List-Help: <ma...@jakarta.apache.org>
>List-Post: <ma...@jakarta.apache.org>
>List-Id: "Turbine Users List" <turbine-user.jakarta.apache.org>
>Delivered-To: mailing list turbine-user@jakarta.apache.org
>X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=
>X-Spam-Check-By: apache.org
>Content-class: urn:content-classes:message
>X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0
>X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: 
>java.lang.OutOfMemoryError
>Thread-Index: AccMyFj99MGsg3K+R0qmj30ZTBCxdAWHBVIA
>X-Virus-Checked: Checked by ClamAV on apache.org
>Return-Path: 
>turbine-user-return-19891-inandjo=hotmail.com@jakarta.apache.org
>X-OriginalArrivalTime: 18 Dec 2006 20:47:07.0648 (UTC) 
>FILETIME=[AEA87800:01C722E5]
>
>What could cause java.lang.OutOfMemoryError ?
>The application is built on turbine/torque/velocity.
>
>Thanks in advance
>
>Jill
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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


RE: java.lang.OutOfMemoryError

Posted by Saurabh Bobde <sb...@cisco.com>.
I had encountered an OoM issue in another context.

I think, if you use the -Xint jvm option, this helps to pinpoint the exact
line of code where the program hits the issue,and is then more easier to
pinpoint the issue. 

Hope this helps,

Saurabh Bobde 
~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
Zensar Technologies Ltd 
The Orion 

"DISCLAIMER: The information contained in this e-mail message may be
privileged, confidential, and protected from disclosure. If you are not the
intended recipient, any further disclosure or use, dissemination,
distribution, or copying of this message or any attachment is strictly
prohibited. Please ensure you have adequate virus protection before you open
or detach any documents from this transmission. Zensar Technologies Inc.
does not accept any liability for virus. If you think that you have received
this e-mail message in error, please delete it and notify the sender." 


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


RE: java.lang.OutOfMemoryError

Posted by Tony Oslund <to...@lifeinnovations.com>.
This is a pretty open ended question...

Are you running out of memory right away, after starting up the server,
or after it has been running a while?

Are you running out of memory under a light load, heavy load?

Are you creating a large number of large objects?

Have you looked at the increasing the app server memory settings?

Are you maintaining your sessions for an unusually long time?

Is there a particular action or portion of code that seems to frequently
generate an out of memory error?  If so what type of actions are taking
place there within your app.

Have you attempted to profile your apps to see where the majority of
memory is being used?

Hope this helps.

-----Original Message-----
From: jill han [mailto:jhan@bynum.com] 
Sent: Monday, December 18, 2006 2:42 PM
To: Turbine Users List; Apache Torque Users List; Velocity Users List
Subject: java.lang.OutOfMemoryError

What could cause java.lang.OutOfMemoryError ?
The application is built on turbine/torque/velocity.

Thanks in advance

Jill


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


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


RE: java.lang.OutOfMemoryError

Posted by Declan Shanaghy <to...@shanaghy.com>.
When does the occur?

You *will* get an OOM error if you are constantly 
reloading a webapp from the tomcat manager.

Im not sure of the exact cause, many people have written about it
all over the web. Its something to do with having to use a new
Classloader each time a webapp is restarted.

Here is one such article.
http://www.mail-archive.com/tomcat-dev@jakarta.apache.org/msg42351.html





-----Original Message-----
From: adam.s.allgaier@exxonmobil.com [mailto:adam.s.allgaier@exxonmobil.com]

Sent: Monday, December 18, 2006 12:53 PM
To: Apache Torque Users List
Subject: Re: java.lang.OutOfMemoryError

I've had this error occur when I'm continously making changes to my app, and
the app server is re-compiling jsps and classes.  Restarting the app server
has resolved this for me.

Your cause may be very different.  :-)

Thank you,
Adam



                                                                           
             "jill han"                                                    
             <jhan@bynum.co                                                
             m>                                                         To 
                                      "Turbine Users List"                 
                                      <tu...@jakarta.apache.org>,   
             12/18/06 02:41           "Apache Torque Users List"           
             PM                       <to...@db.apache.org>,         
                                      "Velocity Users List"                
                                      <ve...@jakarta.apache.org>   
             Please respond                                             cc 
                   to                                                      
             "Apache Torque                                        Subject 
              Users List"             java.lang.OutOfMemoryError           
             <torque-user@d                                                
             b.apache.org>                                                 
                                                                           
                                                                           
                                                                           
                                                                           




What could cause java.lang.OutOfMemoryError ?
The application is built on turbine/torque/velocity.

Thanks in advance

Jill


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




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




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


Re: java.lang.OutOfMemoryError

Posted by ad...@exxonmobil.com.
I've had this error occur when I'm continously making changes to my app,
and the app server is re-compiling jsps and classes.  Restarting the app
server has resolved this for me.

Your cause may be very different.  :-)

Thank you,
Adam



                                                                           
             "jill han"                                                    
             <jhan@bynum.co                                                
             m>                                                         To 
                                      "Turbine Users List"                 
                                      <tu...@jakarta.apache.org>,   
             12/18/06 02:41           "Apache Torque Users List"           
             PM                       <to...@db.apache.org>,         
                                      "Velocity Users List"                
                                      <ve...@jakarta.apache.org>   
             Please respond                                             cc 
                   to                                                      
             "Apache Torque                                        Subject 
              Users List"             java.lang.OutOfMemoryError           
             <torque-user@d                                                
             b.apache.org>                                                 
                                                                           
                                                                           
                                                                           
                                                                           




What could cause java.lang.OutOfMemoryError ?
The application is built on turbine/torque/velocity.

Thanks in advance

Jill


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




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


RE: java.lang.OutOfMemoryError

Posted by Inandjo Taurel <in...@hotmail.com>.
Hi Jill,

generally the outofmemory error occurs when the memory allocated to your JVM 
is not enough.
There are two ways you can address this problem:
- you increase the size of the heap for your JVM.
- you reengineer the part of your code that makes your JVM to crash.
In order for us to respond more precisely and help you with your issue, you 
need to tell us EXACTELY when the outofmemory error occurs.



>From: "jill han" <jh...@bynum.com>
>Reply-To: "Turbine Users List" <tu...@jakarta.apache.org>
>To: "Turbine Users List" <tu...@jakarta.apache.org>,"Apache Torque 
>Users List" <to...@db.apache.org>,"Velocity Users List" 
><ve...@jakarta.apache.org>
>Subject: java.lang.OutOfMemoryError
>Date: Mon, 18 Dec 2006 14:41:50 -0600
>MIME-Version: 1.0
>Received: from mail.apache.org ([140.211.11.2]) by 
>bay0-mc6-f11.bay0.hotmail.com with Microsoft SMTPSVC(6.0.3790.2444); Mon, 
>18 Dec 2006 12:47:07 -0800
>Received: (qmail 68175 invoked by uid 500); 18 Dec 2006 20:47:10 -0000
>Received: (qmail 68116 invoked by uid 99); 18 Dec 2006 20:47:10 -0000
>Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133)    
>by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Dec 2006 12:47:10 -0800
>Received: pass (herse.apache.org: local policy)
>Received: from [64.79.231.74] (HELO blr02.bynum.com) (64.79.231.74)    by 
>apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Dec 2006 12:47:00 -0800
>X-Message-Info: LsUYwwHHNt0nWsLy2dNO2hT4R8km7NfdDo1mWo8Xc4Y=
>Mailing-List: contact turbine-user-help@jakarta.apache.org; run by ezmlm
>Precedence: bulk
>List-Unsubscribe: <ma...@jakarta.apache.org>
>List-Help: <ma...@jakarta.apache.org>
>List-Post: <ma...@jakarta.apache.org>
>List-Id: "Turbine Users List" <turbine-user.jakarta.apache.org>
>Delivered-To: mailing list turbine-user@jakarta.apache.org
>X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=
>X-Spam-Check-By: apache.org
>Content-class: urn:content-classes:message
>X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0
>X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: 
>java.lang.OutOfMemoryError
>Thread-Index: AccMyFj99MGsg3K+R0qmj30ZTBCxdAWHBVIA
>X-Virus-Checked: Checked by ClamAV on apache.org
>Return-Path: 
>turbine-user-return-19891-inandjo=hotmail.com@jakarta.apache.org
>X-OriginalArrivalTime: 18 Dec 2006 20:47:07.0648 (UTC) 
>FILETIME=[AEA87800:01C722E5]
>
>What could cause java.lang.OutOfMemoryError ?
>The application is built on turbine/torque/velocity.
>
>Thanks in advance
>
>Jill
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


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