DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2004-05-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.





--- Additional Comments From [EMAIL PROTECTED]  2004-05-28 07:08 ---
We have the same problem on Tomcat 5.0.19 under Slackware 9.1.0 (2.6.5 kernel):

catalina.out-May 27, 2004 2:20:48 PM org.apache.tomcat.util.threads.ThreadPool
logFull
catalina.out:SEVERE: All threads (300) are currently busy, waiting. Increase
maxThreads (300) or check the servlet status

Our HTTP connector configuration is:
Connector port=8080
   maxThreads=300 minSpareThreads=30 maxSpareThreads=80
   enableLookups=false redirectPort=8443 acceptCount=100
   debug=0 connectionTimeout=2
   disableUploadTimeout=true /

We use big heavy-load web application with some dozens of JSPs with XML
transformation and MySQL storage.

We will try to find luck in Tomcat 5.0.25...

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2004-05-28 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://issues.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.

[EMAIL PROTECTED] changed:

   What|Removed |Added

Version|4.1.24  |4.1.30

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2004-02-24 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.





--- Additional Comments From [EMAIL PROTECTED]  2004-02-24 10:34 ---
Created an attachment (id=10512)
Thread dump of Tomcat after hanging with ThreadPool logFull error

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2004-02-24 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2004-02-24 10:35 ---
Ok, I was having this exact same problem for 4.1.27 and 4.1.29 - I moved to 
5.0.18 and it's appearing again.  In our test environment I can't reproduce 
the error (probably because the load isn't high enough) but as soon as it goes 
into production, Tomcat can grind to a halt in anywhere from 1 minute to 24 
hours after it's started.  Our web application consists of around 6 JSP files 
and some backend classes that execute simple stored procedures on a MSSQL 
Win32 box (Tomcat is running on an HP-UX 11.00 system).

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2004-02-24 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2004-02-24 10:48 ---
Your thread dump looks ok, and in that situation, Tomcat is not hung. OTOH, the
concurrent modification error will end up causing trouble (see bug 26752).
Please don't reopen this bug.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-12-24 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2003-12-25 03:04 ---
*** Bug 25748 has been marked as a duplicate of this bug. ***

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-10-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.





--- Additional Comments From [EMAIL PROTECTED]  2003-10-21 23:57 ---
I am having the exact same problem using Apache 2 connecting to Tomcat 4.1.24 through 
mod_jk2.

In my case, by watching jkstatus, I noticed that the number of threads in use would 
increase once 
every 5 minutes (why, I don't know) until all 75 threads would be used up about 6 
hours later.   
This is on a server with virtually NO LOAD.

Deciding that it was related to connections not being dropped, we changed our 
connectionTimeout 
value for the Connector from 0 to 6.   So far that seems like it has fixed the 
problem.   
Perhaps this will give some further insight into the cause. 

Disclaimer: I haven't applied the attached patches from this bug report.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-10-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.





--- Additional Comments From [EMAIL PROTECTED]  2003-10-22 01:38 ---
BTW, when I said NO LOAD I lied.   I just discovered that I am indeed getting hit 
once every 5 
minutes by something.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-10-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-10-15 09:28 ---
Seeing what you describe, I doubt this is caused by this problem (this report
was about much higher load factors, 10 req/s is very low). If you have
contention or deadlocks elsewhere, the symptoms will be the same (more
processors will be created to handle the incoming requests). Get a thread dump,
which could indicate where the contention is. You should discuss this in
tomcat-user, since the cause of your problem is not likely this particular flaw
of the thread pool.

Allowing unlimited processors to get around this kind of issue could bring your
whole server to its knees, and is a bad idea.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-10-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |



--- Additional Comments From [EMAIL PROTECTED]  2003-10-15 03:02 ---
I am running Tomcat v4.1.28 (which supposedly contains the fix to this bug, 
according to the previous comment), and am still getting this hanging 
problem.  I have tried configuring my connector two different ways, but get 
the hanging problem using both.  When I set the connector's maxProcessors to -
1, during heavy load I see this in cataline.out:
SEVERE: All threads are busy, waiting. Please increase maxThreads or check 
the servlet status200 200

Once this error occurs, the server begins hanging and does not seem to recover 
until I restart tomcat.  A side note is that the number in the error message 
is 200.  This concerns me because I believe a value of -1 is supposed to 
mean unlimited.  
I also tried setting the maxProcessors to 1000.  Under heavy load, I saw this 
error in catalina.out:
SEVERE: All threads are busy, waiting. Please increase maxThreads or check 
the servlet status1000 1000

Again, I had to restart Tomcat to recover from the hanging problem.

BTW, when I say heavy load, I mean about 10 pages per second.  However, 
since we run on a dual Xeon, uptime reports a load of only about 0.5 so the 
CPU is definitely not the limiting factor.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-09-12 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.





--- Additional Comments From [EMAIL PROTECTED]  2003-09-12 08:35 ---
Created an attachment (id=8182)
Binary including the fix

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-09-11 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.





--- Additional Comments From [EMAIL PROTECTED]  2003-09-11 17:07 ---
I have sent you guys another full dump of threads. I do not post it here 
because it has 1500 lines.

There are total 129 instances of ControlRunnable (Thread-2 to Thread-130). You 
will see 125 of them are waiting for monitor entry which is at 
PoolTcpEndpoint.acceptSocket() which will soon trigger ThreadPool.runIt() - 
this.wait(). See it below.

Thread-130 daemon prio=1 tid=0x081af570 nid=0x5c79 waiting for monitor 
entry [51c4b000..51c4b8b8]
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:351)
- waiting to lock 0x44e134e0 (a java.net.PlainSocketImpl)
at java.net.ServerSocket.implAccept(ServerSocket.java:448)
at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.accept(DashoA6275)
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket
(JSSESocketFactory.java:240)
at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket
(PoolTcpEndpoint.java:341)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:497)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:530)
at java.lang.Thread.run(Thread.java:534)

Only 4 instances are idle listed below.

Thread-127 daemon prio=1 tid=0x081ad0c8 nid=0x5c76 in Object.wait() 
[51ac8000..51ac88b8]
at java.lang.Object.wait(Native Method)
- waiting on 0x47acbe10 (a 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Object.wait(Object.java:429)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:509)
- locked 0x47acbe10 (a 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable)
at java.lang.Thread.run(Thread.java:534)

Obviously, there is another defect in Http Connector that causes too many 
thread requests on ThreadPool.

Once this defect meets the first defect I mentioned above in ThreadPool, which 
means all (the maxThreads) instances of ControlRunnable are used to wait for 
listening on the server socket, then all threads will go to the next point at 
TcpWorkerThread.runIt() - endpoint.tp.runIt(this) - ThreadPool.runIt() - 
this.wait(), and hang there.


I have no idea on how Http Connector works to use threads. I think you guys 
will find clues from the dump.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-09-11 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.





--- Additional Comments From [EMAIL PROTECTED]  2003-09-11 17:27 ---
Here is sample codes that implement queue in ThreadPool as I suggested. I do 
not have time and access to CVS, could someone make it a pacth? Thanks.


public class ThreadPool
{
private RunnableQueue queue = new RunnableQueue();

public void runIt(ThreadPoolRunnable r) 
{
queue.put(r);
..
}

static public class RunnableQueue
{
// use a resizeable array for JDK1.1
List queue = new ArrayList();

synchronized public ThreadPoolRunnable get()
{
if(queue.size() == 0)
wait();

ThreadPoolRunnable one = (ThreadPoolRunnable)queue.get(0);
queue.remove(0);

return one;
}

synchronized public ThreadPoolRunnable put(ThreadPoolRunnable one)
{
queue.add(one);
notify();
}
}

public static class ControlRunnable implements Runnable 
{
public void run() {
  try {
while(true) {
try {
toRun = p.queue.get();
..
}
}

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-09-11 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED



--- Additional Comments From [EMAIL PROTECTED]  2003-09-12 04:02 ---
This should be fixed now in the CVS, and should appear in 4.1.28.

It came down to an error condition problem, that eventually causes bad threads 
to take over the connector, leaving no more room for good threads.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-09-10 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]



--- Additional Comments From [EMAIL PROTECTED]  2003-09-10 17:54 ---
*** Bug 23074 has been marked as a duplicate of this bug. ***

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-09-10 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2003-09-10 18:01 ---
Once the pool gets busy, it's normal for the threads to wait here. However, I
have the impression that there's a bug which may happen as soon as the pool gets
full.
Can you reproduce this with 5.0.11 ?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-09-10 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.





--- Additional Comments From [EMAIL PROTECTED]  2003-09-10 19:21 ---
This is due to a defect of design of thread pool in Tomcat 4.1.x. (I have yet 
read sources of 5.x)

An instance of ControlRunnable could wait at two locations. One is in its run() 
method, the another is in ThreadPool's runIt() method via TcpWorkerThread.runIt
(). This causes deadlock.

When a ControlRunnable is waiting at ThreadPool.runIt() via other classes such 
as TcpWorkerThread.runIt() - endpoint.tp.runIt(this). The only chance it gets 
notified is another ControlRunnable to end and to call 
ThreadPool.returnController().

At a moment the server is under a very heavy traffic, all ControlRunnable will 
be hung at ThreadPool.runIt() - this.wait().


I have a solution for this is to use a queue of ThreadPoolRunnable to hold all 
requests. This way, a ControlRunnable no longer need to wait outside.

Thanks,
Rex

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-09-10 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.





--- Additional Comments From [EMAIL PROTECTED]  2003-09-10 20:10 ---
Can you suggest a patch ?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-09-10 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.





--- Additional Comments From [EMAIL PROTECTED]  2003-09-10 20:14 ---
Close, but not quite correct.  If it is waiting in ControlRunnable.run, then 
it is available for requests, so no deadlock is possible.  

The actual problem is with the way it waits for a free ControlRunnable.  At 
the moment, it doesn't notice that it has a free slot if one of the threads 
dies after the pool becomes empty.  It's an easy enough fix however.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-09-10 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.





--- Additional Comments From [EMAIL PROTECTED]  2003-09-10 20:21 ---
Isn't the problem that returnController sync on this (like the code which waits
in findControlRunnable) ?

I'm also investigating a case in parallel where no thread is waiting on accept
on the server socket, for some unknown reason (it could be that the server
socket died - which is likely a non recoverable error -, but the reporter was
unable to find that in his logs, so it could be a TP bug).

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-09-10 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.





--- Additional Comments From [EMAIL PROTECTED]  2003-09-10 20:44 ---
The accept bug should be the same as this one I'm guessing.  That's what you'd 
see soon after you got into the state in 23074.

The sync in findControlRunnable can't really interfer with returnController, 
since it doesn't really spend any time there unless it decides to wait (at 
which point, it no longer owns the Monitor).

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-09-10 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.





--- Additional Comments From [EMAIL PROTECTED]  2003-09-10 22:43 ---
I was considering that patch:

Index: ThreadPool.java
===
RCS file:
/home/cvs/jakarta-tomcat-connectors/util/java/org/apache/tomcat/util/threads/ThreadPool.java,v
retrieving revision 1.13
diff -u -r1.13 ThreadPool.java
--- ThreadPool.java 7 Sep 2003 13:25:26 -   1.13
+++ ThreadPool.java 10 Sep 2003 22:38:53 -
@@ -282,7 +282,17 @@
 }
 
 public void run(Runnable r) {
-ControlRunnable c = findControlRunnable();
+ControlRunnable c = null;
+while (c == null) {
+c = findControlRunnable();
+if (c == null) {
+try {
+Thread.sleep(20);
+} catch (InterruptedException e) {
+// Ignore
+}
+}
+}
 c.runIt(r);
 }
 
@@ -301,7 +311,17 @@
 throw new NullPointerException();
 }
 
-ControlRunnable c = findControlRunnable();
+ControlRunnable c = null;
+while (c == null) {
+c = findControlRunnable();
+if (c == null) {
+try {
+Thread.sleep(20);
+} catch (InterruptedException e) {
+// Ignore
+}
+}
+}
 c.runIt(r);
 }
 
@@ -324,25 +344,7 @@
 openThreads(toOpen);
 } else {
logFull(log, currentThreadCount, maxThreads);
-// Wait for a thread to become idel.
-while(currentThreadsBusy == currentThreadCount) {
-try {
-this.wait();
-}
-   // was just catch Throwable -- but no other
-   // exceptions can be thrown by wait, right?
-   // So we catch and ignore this one, since
-   // it'll never actually happen, since nowhere
-   // do we say pool.interrupt().
-   catch(InterruptedException e) {
-   log.error(Unexpected exception, e);
-}
-
-// Pool was stopped. Get away of the pool.
-if(0 == currentThreadCount || stopThePool) {
-throw new IllegalStateException();
-}
-}
+return null;
 }
 }
 
@@ -678,9 +680,9 @@
 } finally {
 if(shouldRun) {
 shouldRun = false;
-/*
-   * Notify the pool that the thread is now idle.
-*/
+/**
+ * Notify the pool that the thread is now idle.
+ */
 p.returnController(this);
 }
 }

Of course, I don't know to much about the pooling code, and I can't reproduce
the issue to test if that fixes anything.
Please go ahead and fix it if you have a working solution :)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-09-10 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.





--- Additional Comments From [EMAIL PROTECTED]  2003-09-11 05:38 ---
After some initial test, I'm not sure that ThreadPool is really the problem.  
However if Remy's patch works, then this is fixed in the CVS (with a different, 
but fuctionally similar patch).  However, I'm inclined to think that this fixes 
a largely theoretical bug.

If someone that can reliably reproduce this can produce an automated test case, 
or at the least attach the full log file for it, it would be very helpful.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



DO NOT REPLY [Bug 21763] - Tomcat 4.1.24 hangs under heavy load using http connector.

2003-07-21 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=21763

Tomcat 4.1.24 hangs under heavy load using http connector.

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-07-21 13:45 ---
This works for me. Please at least provide a dump of the threads indicating what
they are doing or where a possible deadlock is. I believe the fault lies with
your application.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]