You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter Chen <pe...@aicent.com> on 2009/11/30 09:04:01 UTC

Call for help about the problem "java.lang.OutOfMemoryError: unable to create new native thread" in Tomcat5.5.26

Hello everyone,

I meet one problem of OutOfMemoryError when I am running the Tomcat5.5.26, the following is the detail of stack information. 

Nov 29, 2009 12:41:16 AM 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.LeaderFollowerWorkerThread@958b36, terminating thread
Exception in thread "SIGTERM handler" 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 java.lang.Shutdown.runHooks(Shutdown.java:128)
	at java.lang.Shutdown.sequence(Shutdown.java:173)
	at java.lang.Shutdown.exit(Shutdown.java:218)
	at java.lang.Terminator$1.handle(Terminator.java:35)
	at sun.misc.Signal$1.run(Signal.java:195)
	at java.lang.Thread.run(Thread.java:595)


I think that maybe it's because there are two many threads and I want to set the JAVA_OPTS (-Xss=2048  -Xss:Set thread stack size).But I am not sure.

Can someone give me some advice, thanks in advance.

-----Original Message-----
From: André Warnier [mailto:aw@ice-sa.com] 
Sent: 2009年11月30日 6:55
To: Tomcat Users List
Subject: Re: Tomcat 5.17 crashes too often

Rocco Scappatura wrote:
...
 >> Pid wrote...
>> Wait, so you're running HTTPD + Tomcat?
>>
>> And you have PHP running inside Tomcat, instead of running inside HTTPD?
>>
>> Why aren't you using mod_php?
> 
> Because I need to apply a JSP filter to the PHP page too.. If I demand the
> processing of php page to HTTPD I can't apply the JSP filter to that page.
> 
Just to provide you with even more options then : as far as I know, you 
can run PHP as an output filter in Apache httpd. So you could forward 
the request to Tomcat for the JSP part and, on the Tomcat response, 
apply your PHP output filter in Apache on the way back.

As a matter of general application design however, I must say that I 
find this combination rather on the heavy side.  I mean Java /and/ PHP.
What is it that you absolutely have to do in Java, and in PHP, that you 
cannot substitute by just one of them ?

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


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


Re: Call for help about the problem "java.lang.OutOfMemoryError: unable to create new native thread" in Tomcat5.5.26

Posted by Pid <pi...@pidster.com>.
On 30/11/2009 08:04, Peter Chen wrote:
> Hello everyone,
>
> I meet one problem of OutOfMemoryError when I am running the Tomcat5.5.26, the following is the detail of stack information.
>
> Nov 29, 2009 12:41:16 AM 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.LeaderFollowerWorkerThread@958b36, terminating thread
> Exception in thread "SIGTERM handler" 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 java.lang.Shutdown.runHooks(Shutdown.java:128)
> 	at java.lang.Shutdown.sequence(Shutdown.java:173)
> 	at java.lang.Shutdown.exit(Shutdown.java:218)
> 	at java.lang.Terminator$1.handle(Terminator.java:35)
> 	at sun.misc.Signal$1.run(Signal.java:195)
> 	at java.lang.Thread.run(Thread.java:595)
>
>
> I think that maybe it's because there are two many threads and I want to set the JAVA_OPTS (-Xss=2048  -Xss:Set thread stack size).But I am not sure.
>
> Can someone give me some advice, thanks in advance.

Sure. When requesting help from the list, for each problem, the first 
email you send should be a new email and not an edited reply to someone 
elses thread - which is referred to as 'thread hijacking'.

Please start over, be sure to include your OS and JVM version.


p


> -----Original Message-----
> From: André Warnier [mailto:aw@ice-sa.com]
> Sent: 2009年11月30日 6:55
> To: Tomcat Users List
> Subject: Re: Tomcat 5.17 crashes too often
>
> Rocco Scappatura wrote:
> ...
>   >>  Pid wrote...
>>> Wait, so you're running HTTPD + Tomcat?
>>>
>>> And you have PHP running inside Tomcat, instead of running inside HTTPD?
>>>
>>> Why aren't you using mod_php?
>>
>> Because I need to apply a JSP filter to the PHP page too.. If I demand the
>> processing of php page to HTTPD I can't apply the JSP filter to that page.
>>
> Just to provide you with even more options then : as far as I know, you
> can run PHP as an output filter in Apache httpd. So you could forward
> the request to Tomcat for the JSP part and, on the Tomcat response,
> apply your PHP output filter in Apache on the way back.
>
> As a matter of general application design however, I must say that I
> find this combination rather on the heavy side.  I mean Java /and/ PHP.
> What is it that you absolutely have to do in Java, and in PHP, that you
> cannot substitute by just one of them ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


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