You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Mike Cherichetti (Renegade Internet)" <mi...@renegadeinternet.com> on 2003/08/18 22:42:29 UTC

maxProcessors problem

First off, I'm using RedHat Linux 7.3, IBM JDK 1.4.1, and Tomcat 4.1.24 on
an IBM xSeries with Dual Xeon 2 GHz processors, 2 GB RAM, and SCSI disks.
I'm trying to get Tomcat to handle a lot of traffic (4-5 million hits per
day) and bumping up against a problem I for life of me can't figure out.
So, I'm hoping someone else on this list has run into this problem and can
help me out!

Basically, I can't set maxProcessors higher than 384.  If I do, Tomcat ends
up choking (it doesn't crash, it just stops creating more request
processors) and I get the following in catalina.out:

Aug 18, 2003 5:05:02 AM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on port 80
Aug 18, 2003 5:05:05 AM
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable run
SEVERE: Caught exception executing
org.apache.tomcat.util.net.TcpWorkerThread@6b26b5fe, terminating thread
java.lang.OutOfMemoryError: JVMCI015:OutOfMemoryError, cannot create anymore
threads due to memory or resource constraints
        at java.lang.Thread.start(Native Method)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.<init>(ThreadPool.
java:582)
        at
org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:460)
        at
org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:293)
        at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:536)
        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:619)
        at java.lang.Thread.run(Thread.java:568)

Now, I know that the JVM has plenty of memory left that it can be allocated
and the system has plenty of free memory, so I'm not sure it's really a
memory issue.  As I said, Tomcat still runs and the memory allocated to the
JVM increases, it just doesn't have nearly enough request processors created
at the point this error happens to deal with all of the traffic.  I've tried
playing around with ulimit settings, but those didn't have any impact.  I've
also tried the Sun JVM and it did the same thing.

Has anyone run into this problem or something like it before?

Any help would be greatly appreciated!

Thanks,
Mike




RE: maxProcessors problem

Posted by "Mike Cherichetti (Renegade Internet)" <mi...@renegadeinternet.com>.
Are you saying that I should use JAVA_OPTS instead of CATALINA_OPTS?  I've
set CATALINA_OPTS to use -Xmx896m and -Xms384m already.  Problem is, if I
raise -Xmx or maxProcessors, I get the OutOfMemoryError and Tomcat stops
creating request processors.

Thanks,
Mike

-----Original Message-----
From: Ben Ricker [mailto:bricker@wellinx.com]
Sent: Tuesday, August 19, 2003 11:18 AM
To: Tomcat Users
Subject: Re: maxProcessors problem


On Mon, 2003-08-18 at 15:42, Mike Cherichetti (Renegade Internet) wrote:



> java.lang.OutOfMemoryError: JVMCI015:OutOfMemoryError, cannot create
anymore
> threads due to memory or resource constraints

There is the cheese right there. You need to WAY up your Java System
memory heap using JAVA_OPTS. See this post on the archives:
http://mikal.org/interests/java/tomcat/archive/view?mesg=53417. All the
available options are in the Java docs.

Ben Ricker


>         at java.lang.Thread.start(Native Method)
>         at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.<init>(ThreadPool.
> java:582)
>         at
> org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:460)
>         at
> org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:293)
>         at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:536)
>         at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:619)
>         at java.lang.Thread.run(Thread.java:568)
>
> Now, I know that the JVM has plenty of memory left that it can be
allocated
> and the system has plenty of free memory, so I'm not sure it's really a
> memory issue.  As I said, Tomcat still runs and the memory allocated to
the
> JVM increases, it just doesn't have nearly enough request processors
created
> at the point this error happens to deal with all of the traffic.  I've
tried
> playing around with ulimit settings, but those didn't have any impact.
I've
> also tried the Sun JVM and it did the same thing.
>
> Has anyone run into this problem or something like it before?
>
> Any help would be greatly appreciated!
>
> Thanks,
> Mike
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


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






RE: maxProcessors problem

Posted by "Mike Cherichetti (Renegade Internet)" <mi...@renegadeinternet.com>.
Are you saying that I should use JAVA_OPTS instead of CATALINA_OPTS?  I've
set CATALINA_OPTS to use -Xmx896m and -Xms384m already.  Problem is, if I
raise -Xmx or maxProcessors, I get the OutOfMemoryError and Tomcat stops
creating request processors.

Thanks,
Mike

-----Original Message-----
From: Ben Ricker [mailto:bricker@wellinx.com]
Sent: Tuesday, August 19, 2003 11:18 AM
To: Tomcat Users
Subject: Re: maxProcessors problem


On Mon, 2003-08-18 at 15:42, Mike Cherichetti (Renegade Internet) wrote:



> java.lang.OutOfMemoryError: JVMCI015:OutOfMemoryError, cannot create
anymore
> threads due to memory or resource constraints

There is the cheese right there. You need to WAY up your Java System
memory heap using JAVA_OPTS. See this post on the archives:
http://mikal.org/interests/java/tomcat/archive/view?mesg=53417. All the
available options are in the Java docs.

Ben Ricker


>         at java.lang.Thread.start(Native Method)
>         at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.<init>(ThreadPool.
> java:582)
>         at
> org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:460)
>         at
> org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:293)
>         at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:536)
>         at
>
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:619)
>         at java.lang.Thread.run(Thread.java:568)
>
> Now, I know that the JVM has plenty of memory left that it can be
allocated
> and the system has plenty of free memory, so I'm not sure it's really a
> memory issue.  As I said, Tomcat still runs and the memory allocated to
the
> JVM increases, it just doesn't have nearly enough request processors
created
> at the point this error happens to deal with all of the traffic.  I've
tried
> playing around with ulimit settings, but those didn't have any impact.
I've
> also tried the Sun JVM and it did the same thing.
>
> Has anyone run into this problem or something like it before?
>
> Any help would be greatly appreciated!
>
> Thanks,
> Mike
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


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






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


Re: maxProcessors problem

Posted by Ben Ricker <br...@wellinx.com>.
On Mon, 2003-08-18 at 15:42, Mike Cherichetti (Renegade Internet) wrote:



> java.lang.OutOfMemoryError: JVMCI015:OutOfMemoryError, cannot create anymore
> threads due to memory or resource constraints

There is the cheese right there. You need to WAY up your Java System
memory heap using JAVA_OPTS. See this post on the archives:
http://mikal.org/interests/java/tomcat/archive/view?mesg=53417. All the
available options are in the Java docs.

Ben Ricker


>         at java.lang.Thread.start(Native Method)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.<init>(ThreadPool.
> java:582)
>         at
> org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:460)
>         at
> org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:293)
>         at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:536)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:619)
>         at java.lang.Thread.run(Thread.java:568)
> 
> Now, I know that the JVM has plenty of memory left that it can be allocated
> and the system has plenty of free memory, so I'm not sure it's really a
> memory issue.  As I said, Tomcat still runs and the memory allocated to the
> JVM increases, it just doesn't have nearly enough request processors created
> at the point this error happens to deal with all of the traffic.  I've tried
> playing around with ulimit settings, but those didn't have any impact.  I've
> also tried the Sun JVM and it did the same thing.
> 
> Has anyone run into this problem or something like it before?
> 
> Any help would be greatly appreciated!
> 
> Thanks,
> Mike
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


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


Re: maxProcessors problem

Posted by Ben Ricker <br...@wellinx.com>.
On Mon, 2003-08-18 at 15:42, Mike Cherichetti (Renegade Internet) wrote:



> java.lang.OutOfMemoryError: JVMCI015:OutOfMemoryError, cannot create anymore
> threads due to memory or resource constraints

There is the cheese right there. You need to WAY up your Java System
memory heap using JAVA_OPTS. See this post on the archives:
http://mikal.org/interests/java/tomcat/archive/view?mesg=53417. All the
available options are in the Java docs.

Ben Ricker


>         at java.lang.Thread.start(Native Method)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.<init>(ThreadPool.
> java:582)
>         at
> org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:460)
>         at
> org.apache.tomcat.util.threads.ThreadPool.runIt(ThreadPool.java:293)
>         at
> org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:536)
>         at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
> a:619)
>         at java.lang.Thread.run(Thread.java:568)
> 
> Now, I know that the JVM has plenty of memory left that it can be allocated
> and the system has plenty of free memory, so I'm not sure it's really a
> memory issue.  As I said, Tomcat still runs and the memory allocated to the
> JVM increases, it just doesn't have nearly enough request processors created
> at the point this error happens to deal with all of the traffic.  I've tried
> playing around with ulimit settings, but those didn't have any impact.  I've
> also tried the Sun JVM and it did the same thing.
> 
> Has anyone run into this problem or something like it before?
> 
> Any help would be greatly appreciated!
> 
> Thanks,
> Mike
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


Problem using XPath and x:set, x:out and x:forEach

Posted by Sjoerd van Leent <sv...@wanadoo.nl>.
In short I'm using the following tags:

<jsp:root ...>
<c:import url="WEB-INF/xml/news.xml" var="xmlnews" />
<x:parse xml="${xmlnews}" varDom="news" />
<x:out select="$news" escapeXml="true" />
</jsp:root>

With this document in WEB-INF/xml/news.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>

<items>
	<item>
		blehbleh
	</item>
</items>

Reading the documentation of XPath, this should simply print the total
xml-file without the <?...?> section

However, doing this, I get the following exception:

-----------------------------------------------------------

java.lang.VerifyError: Cannot inherit from final class
	java.lang.ClassLoader.defineClass0(Native Method)
	java.lang.ClassLoader.defineClass(ClassLoader.java:502)
	
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
	
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappCla
ssLoader.java:1656)
	
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader
.java:891)
	
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1340)
	
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1220)
	java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
	
org.apache.taglibs.standard.tag.common.xml.ExprSupport.doStartTag(Unknow
n Source)
	org.apache.jsp.index_jsp._jspx_meth_x_out_0(index_jsp.java:192)
	org.apache.jsp.index_jsp._jspService(index_jsp.java:114)
	
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:320)
	
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
	
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

-----------------------------------------------------------

Does anyone know what I'm doing wrong?



Problem using XPath and x:set, x:out and x:forEach

Posted by Sjoerd van Leent <sv...@wanadoo.nl>.
In short I'm using the following tags:

<jsp:root ...>
<c:import url="WEB-INF/xml/news.xml" var="xmlnews" />
<x:parse xml="${xmlnews}" varDom="news" />
<x:out select="$news" escapeXml="true" />
</jsp:root>

With this document in WEB-INF/xml/news.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>

<items>
	<item>
		blehbleh
	</item>
</items>

Reading the documentation of XPath, this should simply print the total
xml-file without the <?...?> section

However, doing this, I get the following exception:

-----------------------------------------------------------

java.lang.VerifyError: Cannot inherit from final class
	java.lang.ClassLoader.defineClass0(Native Method)
	java.lang.ClassLoader.defineClass(ClassLoader.java:502)
	
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
	
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappCla
ssLoader.java:1656)
	
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader
.java:891)
	
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1340)
	
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1220)
	java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
	
org.apache.taglibs.standard.tag.common.xml.ExprSupport.doStartTag(Unknow
n Source)
	org.apache.jsp.index_jsp._jspx_meth_x_out_0(index_jsp.java:192)
	org.apache.jsp.index_jsp._jspService(index_jsp.java:114)
	
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:136)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
	
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.ja
va:320)
	
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:293)
	
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:240)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:856)

-----------------------------------------------------------

Does anyone know what I'm doing wrong?



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