You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Sanjay Francis <sf...@webifyservices.com> on 2003/08/11 14:53:45 UTC

Out of memory

Hi,
We have built a application using tapestry.
we use jboss 3.0.6 as our test application server.
Development Machine is P4 with 512MB ram. Ater executing the application 10 to 15 times it goes out of memory.
Other applications built using struts, velocity deployed on the same app server doesn't cause this problem.
Do I need to do any special settings to fix this problem.

Sanjay




Re: Out of memory

Posted by Detlef Schulze <de...@jaide.de>.
If you are sure that you don't have a memory leak in your source code, you
can try to give the VM more memory. This is done (at least with the sun VM)
via the -Xmx commandline switch:

javac -Xms32m -Xmx256m your.startup.class

for example starts the VM with a minimum of 32 and a maximum of 256
Megabytes of memory for the heap. I usually set the same values for mx and
ms, which means that all of the memory will be allocated on VM startup
instead of re-allocating when necessary.


hth,
Detlef

----- Original Message -----
From: "Sanjay Francis" <sf...@webifyservices.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Monday, August 11, 2003 2:53 PM
Subject: Out of memory


Hi,
We have built a application using tapestry.
we use jboss 3.0.6 as our test application server.
Development Machine is P4 with 512MB ram. Ater executing the application 10
to 15 times it goes out of memory.
Other applications built using struts, velocity deployed on the same app
server doesn't cause this problem.
Do I need to do any special settings to fix this problem.

Sanjay






Re: Out of memory

Posted by Detlef Schulze <de...@jaide.de>.
Don't use 1.4.1-beta! Use the latest JDK (at least the latest version of
1.4.1, better 1.4.2), there were some serious bugs with the first 1.4.1
versions.


----- Original Message -----
From: "Sanjay Francis" <sf...@webifyservices.com>
To: "Adam Greene" <ag...@romulin.com>; "Tapestry users"
<ta...@jakarta.apache.org>
Sent: Monday, August 11, 2003 3:45 PM
Subject: Re: Out of memory


> it generally happens after redeploying,
> The jetty version of JBoss running on Windows 2000 and JDK version
> "1.4.1-beta"
>



Re: Out of memory

Posted by Bryan Lewis <br...@maine.rr.com>.
> It's interesting that this didn't appear for you with your struts/velocity
> implementation.  I suspect scripting-type code could be more cleanly
> separated from the server and easier for JBoss to clean up.

On second thought, that suspicion isn't very well founded.  In my case, the
memory leak occurred with a pre-Tapestry, plain old JSP implementation.



Re: Out of memory

Posted by Bryan Lewis <br...@maine.rr.com>.
JBoss has a memory leak in its hot redeployment.  This thread on the JBoss
forums might help.
http://www.jboss.org/thread.jsp?forum=121&thread=27888&message=3769573&q=#37
69573

In my case, every time I redeployed a little 2.6-MB test app, memory usage
grew by 5 MB.

There was an old bug report on sourceforge about this, but it was closed
with the comment, "Unfortunately memory is always limited and therefore hot
deployment will one time reach a limit because all the loaded classes are
not removed from the classloaders."  Perhaps it's not possible to clean up
the old classes completely because they're still in use at the time of the
redeployment.

If you're redeploying a large app several times a day, and you've only got
512 MB, yeah, you'll get the dreaded java.lang.OutOfMemoryError before long.

It's interesting that this didn't appear for you with your struts/velocity
implementation.  I suspect scripting-type code could be more cleanly
separated from the server and easier for JBoss to clean up.


----- Original Message -----
From: "Sanjay Francis" <sf...@webifyservices.com>
To: "Adam Greene" <ag...@romulin.com>; "Tapestry users"
<ta...@jakarta.apache.org>
Sent: Monday, August 11, 2003 9:45 AM
Subject: Re: Out of memory


> it generally happens after redeploying,
> The jetty version of JBoss running on Windows 2000 and JDK version
> "1.4.1-beta"
>
>
> ----- Original Message -----
> From: "Adam Greene" <ag...@romulin.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>; "Sanjay Francis"
> <sf...@webifyservices.com>
> Sent: Monday, August 11, 2003 6:40 PM
> Subject: RE: Out of memory
>
>
> > "After executing the application" -- Do you mean after viewing pages
10 -
> 15
> > times, or do you mean making changes and redeploying?  Are you using the
> > Tomcat version of JBoss or the Jetty version?  What OS are you running
on?
> > More details like this would help as I know that Tomcat / Sun JDK has a
> > serious problem under certain versions of Linux with losing it's threads
> > (they take up memory but refuse to respond to the JVM and when Tomcat is
> > stopped, they refuse to exit and you end up with a whole bunch of
threads
> > just sitting that need to be kill'ed).
> >
> > -----Original Message-----
> > From: Sanjay Francis [mailto:sfrancis@webifyservices.com]
> > Sent: Monday, August 11, 2003 9:54 AM
> > To: Tapestry users
> > Subject: Out of memory
> >
> >
> > Hi,
> > We have built a application using tapestry.
> > we use jboss 3.0.6 as our test application server.
> > Development Machine is P4 with 512MB ram. Ater executing the application
> 10
> > to 15 times it goes out of memory.
> > Other applications built using struts, velocity deployed on the same app
> > server doesn't cause this problem.
> > Do I need to do any special settings to fix this problem.
> >
> > Sanjay
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>


Re: Out of memory

Posted by Sanjay Francis <sf...@webifyservices.com>.
it generally happens after redeploying,
The jetty version of JBoss running on Windows 2000 and JDK version
"1.4.1-beta"


----- Original Message -----
From: "Adam Greene" <ag...@romulin.com>
To: "Tapestry users" <ta...@jakarta.apache.org>; "Sanjay Francis"
<sf...@webifyservices.com>
Sent: Monday, August 11, 2003 6:40 PM
Subject: RE: Out of memory


> "After executing the application" -- Do you mean after viewing pages 10 -
15
> times, or do you mean making changes and redeploying?  Are you using the
> Tomcat version of JBoss or the Jetty version?  What OS are you running on?
> More details like this would help as I know that Tomcat / Sun JDK has a
> serious problem under certain versions of Linux with losing it's threads
> (they take up memory but refuse to respond to the JVM and when Tomcat is
> stopped, they refuse to exit and you end up with a whole bunch of threads
> just sitting that need to be kill'ed).
>
> -----Original Message-----
> From: Sanjay Francis [mailto:sfrancis@webifyservices.com]
> Sent: Monday, August 11, 2003 9:54 AM
> To: Tapestry users
> Subject: Out of memory
>
>
> Hi,
> We have built a application using tapestry.
> we use jboss 3.0.6 as our test application server.
> Development Machine is P4 with 512MB ram. Ater executing the application
10
> to 15 times it goes out of memory.
> Other applications built using struts, velocity deployed on the same app
> server doesn't cause this problem.
> Do I need to do any special settings to fix this problem.
>
> Sanjay
>
>
>


RE: Out of memory

Posted by Adam Greene <ag...@romulin.com>.
"After executing the application" -- Do you mean after viewing pages 10 - 15
times, or do you mean making changes and redeploying?  Are you using the
Tomcat version of JBoss or the Jetty version?  What OS are you running on?
More details like this would help as I know that Tomcat / Sun JDK has a
serious problem under certain versions of Linux with losing it's threads
(they take up memory but refuse to respond to the JVM and when Tomcat is
stopped, they refuse to exit and you end up with a whole bunch of threads
just sitting that need to be kill'ed).

-----Original Message-----
From: Sanjay Francis [mailto:sfrancis@webifyservices.com]
Sent: Monday, August 11, 2003 9:54 AM
To: Tapestry users
Subject: Out of memory


Hi,
We have built a application using tapestry.
we use jboss 3.0.6 as our test application server.
Development Machine is P4 with 512MB ram. Ater executing the application 10
to 15 times it goes out of memory.
Other applications built using struts, velocity deployed on the same app
server doesn't cause this problem.
Do I need to do any special settings to fix this problem.

Sanjay