Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Re: Urgent! Tomcat4 closed giving Out of Memory Error

Tim Funk

2003-12-06

Replies:

When you get "java.lang.OutOfMemoryError: unable to create new native thread"
it means you are running into an operating system limit. You can give the JVM
1 Exabyte of memory and you'll still get this error.

Look at the kernel parameters for your machine and the following limits:
1) Threads allowable on the system
2) Threads run by a user
3) Threads run by a process
4) File handles per process
5) File handles per user

Use your OS manual or Google to tweak these parameters.

http://jakarta.apache.org/tomcat/faq/memory.html#why

-Tim

qi zhang wrote:
> Hi,
>
> I have stunk on this problem for almost 2 weeks. :-(
> In these two weeks, I have tried many methods, but it still doesn't work.
>
> I built a system to run TPCW benchmark. One web and application server,
> with tomcat4.0 running, one database with mysql4.0 running on it and
> several client machines. The Jave version is j2sdk1.4.0_03. The system
> worked perfect under light load. But when the number of clients
> exceeded some number (like 600), the tomcat4 didn't work anymore.
> I checked catalina.out. Sometimes no error message appear, while in some
> time it appeared the error:
>
> SEVERE: Caught exception executing
> org.apache.tomcat.util.net.TcpWorkerThread@(protected)
> java.lang.OutOfMemoryError: unable to create new native thread
>      at java.lang.Thread.start(Native Method)
>      at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.<init>(ThreadPool.java:497)
>      at


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.