You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ming Zhao <fl...@yahoo.com> on 2002/12/05 18:49:03 UTC
How to set JVM memory size?
Hi,
I have a question to seek for your help. How do I set
the JVM memory size? I use Apache Tomcat4.1.16 and
J2SDK1.3. Now it seems that I have a problem of not
enough memory to implement the java bean. I want to
set JVM memory with writing some commands to some
file. So Tomcat can activate J2SDK with set memory
size. How to do that?
Thanks in advance,
Ming
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: How to set JVM memory size?
Posted by Ming Zhao <fl...@yahoo.com>.
Thank Jeremy and Brandon for you help.
Under windows 2k, I set an environment variable to
change the java heap size within JVM (just as Brandom
said). But it seems not work. So I'm not suer my
setting is correct or there is other problem.
At first I thought it's memory problem because I got
an error when I run a simulation java bean with longer
running time (real model time, not the bean running
time, I can set it on the website); but with short
running time, it can work well. The exception is:
type Exception report
message
description The server encountered an internal error
() that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:431)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:537)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:484)
root cause
javax.servlet.ServletException
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
at
org.apache.jsp.simul_jsp._jspService(simul_jsp.java:317)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:431)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:386)
at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:537)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
at java.lang.Thread.run(Thread.java:484)
Do you have any suggestion?
Ming
--- Jeremy Joslin <je...@spotlife.com> wrote:
> It's important to realize that this is setting the
> size of the Java heap
> within the JVM (which sounds like what you're
> looking for) and not the
> actual size of the JVM itself. Also note that
> you're not always going
> to get the best performance out of your app by using
> a large heap size
> because while it decreases the frequency of GC's the
> time each GC takes
> is going to increase (more to collect). So, and I
> know I'm not the
> first to say this, play around with the different
> settings until you
> find the one that suits your app.
>
> Jeremy
>
> > -----Original Message-----
> > From: Brandon Cruz [mailto:bcruz@norvax.com]
> > Sent: Thursday, December 05, 2002 10:27 AM
> > To: Tomcat Users List
> > Subject: RE: How to set JVM memory size?
> >
> > Set an environment variable called JAVA_OPTS and
> set your max and min
> to
> > whatever you want like this...
> >
> > -Xmx512m -Xms256m
> >
> > Brandon
> >
> > -----Original Message-----
> > From: Ming Zhao [mailto:flying_minger@yahoo.com]
> > Sent: Thursday, December 05, 2002 11:49 AM
> > To: tomcat-user@jakarta.apache.org
> > Subject: How to set JVM memory size?
> >
> >
> > Hi,
> >
> > I have a question to seek for your help. How do I
> set
> > the JVM memory size? I use Apache Tomcat4.1.16 and
> > J2SDK1.3. Now it seems that I have a problem of
> not
> > enough memory to implement the java bean. I want
> to
> > set JVM memory with writing some commands to some
> > file. So Tomcat can activate J2SDK with set memory
> > size. How to do that?
> >
> > Thanks in advance,
> > Ming
> >
> > __________________________________________________
> > Do you Yahoo!?
> > New DSL Internet Access from SBC & Yahoo!
> > http://sbc.yahoo.com
> >
> > --
> > To unsubscribe, e-mail:
> >
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> >
> >
> >
> > --
> > To unsubscribe, e-mail: <mailto:tomcat-user-
> > unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:tomcat-user-
> > help@jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: How to set JVM memory size?
Posted by Jeremy Joslin <je...@spotlife.com>.
It's important to realize that this is setting the size of the Java heap
within the JVM (which sounds like what you're looking for) and not the
actual size of the JVM itself. Also note that you're not always going
to get the best performance out of your app by using a large heap size
because while it decreases the frequency of GC's the time each GC takes
is going to increase (more to collect). So, and I know I'm not the
first to say this, play around with the different settings until you
find the one that suits your app.
Jeremy
> -----Original Message-----
> From: Brandon Cruz [mailto:bcruz@norvax.com]
> Sent: Thursday, December 05, 2002 10:27 AM
> To: Tomcat Users List
> Subject: RE: How to set JVM memory size?
>
> Set an environment variable called JAVA_OPTS and set your max and min
to
> whatever you want like this...
>
> -Xmx512m -Xms256m
>
> Brandon
>
> -----Original Message-----
> From: Ming Zhao [mailto:flying_minger@yahoo.com]
> Sent: Thursday, December 05, 2002 11:49 AM
> To: tomcat-user@jakarta.apache.org
> Subject: How to set JVM memory size?
>
>
> Hi,
>
> I have a question to seek for your help. How do I set
> the JVM memory size? I use Apache Tomcat4.1.16 and
> J2SDK1.3. Now it seems that I have a problem of not
> enough memory to implement the java bean. I want to
> set JVM memory with writing some commands to some
> file. So Tomcat can activate J2SDK with set memory
> size. How to do that?
>
> Thanks in advance,
> Ming
>
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> For additional commands, e-mail:
> <ma...@jakarta.apache.org>
>
>
>
> --
> To unsubscribe, e-mail: <mailto:tomcat-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-user-
> help@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: How to set JVM memory size?
Posted by Brandon Cruz <bc...@norvax.com>.
Set an environment variable called JAVA_OPTS and set your max and min to
whatever you want like this...
-Xmx512m -Xms256m
Brandon
-----Original Message-----
From: Ming Zhao [mailto:flying_minger@yahoo.com]
Sent: Thursday, December 05, 2002 11:49 AM
To: tomcat-user@jakarta.apache.org
Subject: How to set JVM memory size?
Hi,
I have a question to seek for your help. How do I set
the JVM memory size? I use Apache Tomcat4.1.16 and
J2SDK1.3. Now it seems that I have a problem of not
enough memory to implement the java bean. I want to
set JVM memory with writing some commands to some
file. So Tomcat can activate J2SDK with set memory
size. How to do that?
Thanks in advance,
Ming
__________________________________________________
Do you Yahoo!?
New DSL Internet Access from SBC & Yahoo!
http://sbc.yahoo.com
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>