You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Rashmi Rubdi <de...@yahoo.com> on 2007/03/15 15:59:13 UTC
Re: tomcat 5.5
I think trying to increase the memory configuration in any application doesn't necessarily contribute to it's speed because the garbage collector
does not perform serious attempts to release memory until the heap size limit is reached.
So, having a lower heap size limit (lower max memory setting), ensures that the garbage collector releases as much memory as possible in a shorter interval and having a higher memory setting significantly delays the garbage collection.
My suggestion is that it is better to keep the original memory settings than increase it, and only increase it if your project is too large or resource intensive and requires additional memory and not because there's plenty of memory available - why not use it.
-Rashmi
----- Original Message ----
From: Rahul Tandon <ra...@flextrade.com>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Thursday, March 15, 2007 10:25:22 AM
Subject: tomcat 5.5
Hi,
I had posted this yesterday and got some feedback from chuck, but still
there is no concrete resolution to the problem, if somebody knows anything
about this kind of issue, please help me.
I am using following configuration:
Red Hat Enterprise Linux AS release 3 (Taroon Update 4)
4GB RAM
Tomcat version 5.5
Java version "1.5.0_06"
Tomcat connectors setting: maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"
ulimit -a also seems ok:
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) 4
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 7168
virtual memory (kbytes, -v) unlimited
. I am using CATALINA_OPTS "-Xms512m -Xmx512m -Djava.awt.headless=true" and
tomcat comes up fine and my http requests are processed normal.
If I change memory setting to 1024m (-Xmx1024m -Xms512m) then I
am getting this error:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:574)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.<init>(ThreadPool.
java:643)
at
org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:515)
at
org.apache.tomcat.util.threads.ThreadPool.start(ThreadPool.java:148)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.jav
a:315)
at
org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:15
0)
at
org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:75)
at
org.apache.catalina.connector.Connector.start(Connector.java:1089)
at
org.apache.catalina.core.StandardService.start(StandardService.java:459)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
... 6 more
And tomcat hangs and does not respond to http requests.
I am checking vmstat at this time and see 3GB free memory.
I would appreciate any help.
Thanks,
Rahul Tandon
____________________________________________________________________________________
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail
---------------------------------------------------------------------
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 5.5
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Rashmi Rubdi [mailto:dev_subscriptions@yahoo.com]
> Subject: Re: tomcat 5.5
>
> So, having a lower heap size limit (lower max memory
> setting), ensures that the garbage collector releases as much
> memory as possible in a shorter interval and having a higher
> memory setting significantly delays the garbage collection.
Actually, the length of time spent in GC is almost entirely dependent on
the number of live objects and not the size of the heap. The number of
live objects fluctuates a relatively small amount for most applications,
so it's usually beneficial to run with as large a heap as you can get
away with.
In this case, the JVM isn't running out of heap space - it's the
underlying OS that's refusing to create additional threads when the JVM
heap is enlarged enough to impact the remaining virtual space for the
process. Might be something as simple as not having a large enough swap
file.
- 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
RE: tomcat 5.5
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Rahul Tandon [mailto:rahul.tandon@flextrade.com]
> Subject: RE: tomcat 5.5
>
> The Apache Tomcat Native library which allows optimal performance in
> production environments was not found
That has no bearing on your OOME; it's displayed when the APR .dll or
.so file isn't installed. For Linux platforms, you usually have to
build it from source. Tomcat defaults to the pure Java connector when
the APR one isn't available.
- 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
RE: tomcat 5.5
Posted by Rahul Tandon <ra...@flextrade.com>.
Thanks Rashmi for the suggestion. My application is using (some time) quite
a big memory (I need 1GB once in a while!!!), that's why I wanted to have
this setting.
One other thing I notice(which I am not sure of), will this error would have
any effect:
The Apache Tomcat Native library which allows optimal performance in
production environments was not found
Thanks again.
Rahul Tandon
516-627-8993 Xtn 208
rahul.tandon@flextrade.com
111 Great Neck Rd.,Suite #314
Great Neck, NY 11021
This communication is for informational purposes only. The contents of this
transmission are confidential and are intended solely for the use of the
individual or entity to whom they are addressed.If you have received this
email in error please notify the sender by return email and delete this
message from your system. Flextrade Systems Inc., its subsidiaries and
affiliates do not guarantee the completeness and accuracy of this
transmission's contents. Moreover, Flextrade Systems Inc., its subsidiaries
and affiliates do not guarantee this communication to be free of viruses and
accept no liability for any damage caused thereof.
-----Original Message-----
From: Rashmi Rubdi [mailto:dev_subscriptions@yahoo.com]
Sent: Thursday, March 15, 2007 10:59 AM
To: Tomcat Users List
Subject: Re: tomcat 5.5
I think trying to increase the memory configuration in any application
doesn't necessarily contribute to it's speed because the garbage collector
does not perform serious attempts to release memory until the heap size
limit is reached.
So, having a lower heap size limit (lower max memory setting), ensures that
the garbage collector releases as much memory as possible in a shorter
interval and having a higher memory setting significantly delays the garbage
collection.
My suggestion is that it is better to keep the original memory settings than
increase it, and only increase it if your project is too large or resource
intensive and requires additional memory and not because there's plenty of
memory available - why not use it.
-Rashmi
----- Original Message ----
From: Rahul Tandon <ra...@flextrade.com>
To: Tomcat Users List <us...@tomcat.apache.org>
Sent: Thursday, March 15, 2007 10:25:22 AM
Subject: tomcat 5.5
Hi,
I had posted this yesterday and got some feedback from chuck, but still
there is no concrete resolution to the problem, if somebody knows anything
about this kind of issue, please help me.
I am using following configuration:
Red Hat Enterprise Linux AS release 3 (Taroon Update 4)
4GB RAM
Tomcat version 5.5
Java version "1.5.0_06"
Tomcat connectors setting: maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"
ulimit -a also seems ok:
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) 4
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 7168
virtual memory (kbytes, -v) unlimited
. I am using CATALINA_OPTS "-Xms512m -Xmx512m -Djava.awt.headless=true" and
tomcat comes up fine and my http requests are processed normal.
If I change memory setting to 1024m (-Xmx1024m -Xms512m) then I
am getting this error:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method)
at java.lang.Thread.start(Thread.java:574)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.<init>(ThreadPool.
java:643)
at
org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:515)
at
org.apache.tomcat.util.threads.ThreadPool.start(ThreadPool.java:148)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.jav
a:315)
at
org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:15
0)
at
org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:75)
at
org.apache.catalina.connector.Connector.start(Connector.java:1089)
at
org.apache.catalina.core.StandardService.start(StandardService.java:459)
at
org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
... 6 more
And tomcat hangs and does not respond to http requests.
I am checking vmstat at this time and see 3GB free memory.
I would appreciate any help.
Thanks,
Rahul Tandon
____________________________________________________________________________
________
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail
---------------------------------------------------------------------
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
---------------------------------------------------------------------
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