Java out of memory error

2010-10-20 Thread rujin raj
Hi all,

In my tomcat application server frequently i am getting the java out of
memory error.

*Error:*
20 Oct, 2010 1:09:41 PM
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run
SEVERE: Caught exception (java.lang.OutOfMemoryError: unable to create new
native thread) executing
org.apache.tomcat.util.net.leaderfollowerworkerthr...@d3e5cc, terminating
thread


*Server.Xml Config:*

*http-443*
Current thread count: 1000 Current threads busy: 923 Max threads: 5000 Max
spare threads: 1175 Min spare threads: 500
Max time (ms): 156766 Processing time (ms): 63838188 Request count: 13233
Error count: 789 Received: 392Kb Sent: 81Mb

Is this configuration is normal or any modification required to work the
application proper??

Tomcat Version:Apache Tomcat 5.5.20
Java JRE 1.6.0

Regards
rujinraj


Re: Java out of memory error

2010-10-20 Thread Pid
On 20/10/2010 09:15, rujin raj wrote:
 Hi all,
 
 In my tomcat application server frequently i am getting the java out of
 memory error.
 
 *Error:*
 20 Oct, 2010 1:09:41 PM
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run
 SEVERE: Caught exception (java.lang.OutOfMemoryError: unable to create new
 native thread) executing
 org.apache.tomcat.util.net.leaderfollowerworkerthr...@d3e5cc, terminating
 thread
 
 
 *Server.Xml Config:*
 
 *http-443*
 Current thread count: 1000 
 Current threads busy: 923
 Max threads: 5000 
 Max spare threads: 1175
 Min spare threads: 500
 Max time (ms): 156766
 Processing time (ms): 63838188
 Request count: 13233
 Error count: 789
 Received: 392Kb Sent: 81Mb
 
 Is this configuration is normal or any modification required to work the
 application proper??

5000 threads might be a little excessive, depending on what your
application is doing and how much memory a thread consumes versus how
much resource the physical machine has.

789 errors for only 81Mb sent seems a little high.  Are you load testing
or is this in production?

How much memory does the machine have?

How much is allocated to Tomcat?

What operating system is it?


p

 Tomcat Version:Apache Tomcat 5.5.20
 Java JRE 1.6.0
 
 Regards
 rujinraj
 



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: Java out of memory error

2010-10-20 Thread rujin raj
Hi,
789 errors for only 81Mb sent seems a little high.  Are you load testing
or is this in production?

Is there any modification required in configuration file? Thia is production
machine. How can I test the load how much it will capable?

How much memory does the machine have?

The Physical memory of the system is 32GB.

How much is allocated to Tomcat?

1GB is allocated for JAVA. Not able to allocate more memory for java

What operating system is it?

Windows 2008 ent Server 64 bit is installed. Tomcat and JAVA are 32 bit

What is the Garbage collection in JAVA? If i Force Garbage collection using
the Lambda probe tomcat monitor whether it will affect any user sessions or
anything??

Rujinraj



On 20 October 2010 15:44, Pid p...@pidster.com wrote:

 On 20/10/2010 09:15, rujin raj wrote:
  Hi all,
 
  In my tomcat application server frequently i am getting the java out of
  memory error.
 
  *Error:*
  20 Oct, 2010 1:09:41 PM
  org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run
  SEVERE: Caught exception (java.lang.OutOfMemoryError: unable to create
 new
  native thread) executing
  org.apache.tomcat.util.net.leaderfollowerworkerthr...@d3e5cc,
 terminating
  thread
 
 
  *Server.Xml Config:*
 
  *http-443*
  Current thread count: 1000
  Current threads busy: 923
  Max threads: 5000
  Max spare threads: 1175
  Min spare threads: 500
  Max time (ms): 156766
  Processing time (ms): 63838188
  Request count: 13233
  Error count: 789
  Received: 392Kb Sent: 81Mb
 
  Is this configuration is normal or any modification required to work the
  application proper??

 5000 threads might be a little excessive, depending on what your
 application is doing and how much memory a thread consumes versus how
 much resource the physical machine has.

 789 errors for only 81Mb sent seems a little high.  Are you load testing
 or is this in production?

 How much memory does the machine have?

 How much is allocated to Tomcat?

 What operating system is it?


 p

  Tomcat Version:Apache Tomcat 5.5.20
  Java JRE 1.6.0
 
  Regards
  rujinraj
 




RE: Java out of memory error

2010-10-20 Thread Caldarale, Charles R
 From: rujin raj [mailto:rujin...@gmail.com] 
 Subject: Re: Java out of memory error

 Windows 2008 ent Server 64 bit is installed.
 Tomcat and JAVA are 32 bit

You're never going to be able to run that many threads in a 32-bit process.  
Use a 64-bit JVM, or reduce the max threads count considerably.

This has nothing to do with running out of heap space - you've exceeded the 
process space due to the excessive number of threads.  You could reduce the 
heap and have room for more threads, but that might cause other problems.  If 
you really need to run that large a workload, move to a 64-bit JVM.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Java out of memory error

2010-10-14 Thread rujin raj
hi all,

I have Installed tomcat 5.5.20 on my windows 2008 server with 32 GB physical
memory and the Java version is jre1.6.0. Five applications are installed in
it.Today i got one error and applications not working.Error as follows

Tomcat log:
*14 Oct, 2010 4:08:05 PM
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run*
*SEVERE: Caught exception (java.lang.OutOfMemoryError: unable to create new
native thread) executing
org.apache.tomcat.util.net.leaderfollowerworkerthr...@10d564d, terminating
thread*
*
*
In javaVM I set the initial memory pool size as 1000MB, Max memory pool size
as 1200MB and thread stack size as blank.More over I am not able to set the
minimum pool size more than 1024 MB.

How can I increase the JVM memory more than 1GB??

What might me the cause for java out of memory error? How to resolve the
problem?

Please help me to resolve the problem.

Regards
rujinraj

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Re: Java out of memory error

2010-10-14 Thread Juha Laiho

On 10/14/2010 02:19 PM, rujin raj wrote:

I have Installed tomcat 5.5.20 on my windows 2008 server with 32 GB
physical memory and the Java version is jre1.6.0.


Is the OS installation 64-bit or 32-bit?

If the application is 64-bit, is the Java installation 64-bit or 32-bit?
(I suppose your Java installation is 32-bit)


Five applications are installed in it.Today i got one error and

 applications not working.Error as follows


Tomcat log:
*14 Oct, 2010 4:08:05 PM
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run*
*SEVERE: Caught exception (java.lang.OutOfMemoryError: unable to create
new native thread) executing
org.apache.tomcat.util.net.leaderfollowerworkerthr...@10d564d,
terminating thread*
*
*
In javaVM I set the initial memory pool size as 1000MB, Max memory pool
size as 1200MB and thread stack size as blank.More over I am not able to
set the minimum pool size more than 1024 MB.

How can I increase the JVM memory more than 1GB??


First, a 64-bit Java installation is needed. And this is only available,
if the operating system installation is 64-bit.

With these two requirements fulfilled, the JVM can be configured with
larger memory allocations.


What might me the cause for java out of memory error? How to resolve the
problem?


I'm a bit uncertain of the error message, however: it may be that it's
not actually JVM memory that is exhausted, but threads. Could it be that
your application is starting new threads, but not disposing of them
properly?

If it is a memory exhaustion situation, you should be able to find
numerous discussions on how to pinpoint memory leaks in applications
running under Tomcat. Some of the memory analysis techniques might
help in resolving thread exhaustion issues, too (if you can locate
the unexpected thread objects and find what is keeping them alive).
Another way to find out about the threads is to produce a thread
dump of the running JVM (that also has been often discussed on
this list).

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Java out of memory error

2010-10-14 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Rujin,

On 10/14/2010 7:19 AM, rujin raj wrote:
 I have Installed tomcat 5.5.20 on my windows 2008 server with 32 GB
 physical memory and the Java version is jre1.6.0.

Just a note: 5.5.20 is over 4 years old. You should really upgrade to
5.5.30 or even to 6.0.29. Upgrading from 5.5 to 6.0 is pretty seamless.

Are you using a 32-bit of 64-bit JVM? If you are using a 32-bit VM then
you are not able to take advantage of all that sweet, sweet system memory.

 Today i got one error and applications not working.Error as follows
 
 Tomcat log:
 *14 Oct, 2010 4:08:05 PM
 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run*
 *SEVERE: Caught exception (java.lang.OutOfMemoryError: unable to create
 new native thread) executing
 org.apache.tomcat.util.net.leaderfollowerworkerthr...@10d564d,
 terminating thread*
 *
 *
 In javaVM I set the initial memory pool size as 1000MB, Max memory pool
 size as 1200MB and thread stack size as blank.More over I am not able to
 set the minimum pool size more than 1024 MB.
 
 How can I increase the JVM memory more than 1GB?? 

Looks like you are on a 32-bit JVM. Try upgrading to a 64-bit JVM if you
want more memory, although memory probably isn't your real problem.

 What might me the cause for java out of memory error? How to resolve the
 problem?

Note the entire message: java.lang.OutOfMemoryError: unable to create
new native thread. It doesn't say it's out of heap space, it says that
it can't create a new native thread. There are a couple of reasons this
could happen:

1. The Tomcat user cannot create any more threads because of a thread
limit within a single process. Windows can limit the number of threads a
process can create as a security and resource management mechanism.

2. The process can't create another thread due to the available (native)
memory and the stack size you have for a thread.

This page has some good information about thread limits on Windows:
http://blogs.technet.com/b/markrussinovich/archive/2009/07/08/3261309.aspx

Can you post all of the JVM arguments you are using to start Java?

Could you also post all the Connector elements from your
conf/server.xml file?

Finally, can you comment on the use of any threads within your own
application that are /not/ managed by Tomcat? For instance, do you use
TimerTask/Quartz to do background jobs, or do you launch any of your own
threads?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAky3HW8ACgkQ9CaO5/Lv0PDeegCeJ+5I8eyEErTA5JGm/GatECiz
VF4An3pOLa0D9kltombztjf4rm7UxIGO
=tpHH
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org