RE: How to limit time for Connector threads?
Hi all, I would like to finish this mailing thread and public results. In the end I found that some thread waits in java.net.SocketOutputStream.socketWrite0(Native Method) method. Probably reason was that server waited for timeout because client had broken connection. Because I have main entry app method synchronized all other treads waited for an end of this one thread. Hence, server didn't answer. Workaround solution for my particular problem: I have made CacheFilter. I let the treads write into my memory buffer instead of the original output stream. When the synchronized section is done I write buffered date to the original stream. You can download my tree simple classes from: http://info.vsb.cz/test/cacheFilter.zip. It is not general solution but it solves my particular problem in my particular environment. Inspiration for Filters I take from: http://www.javaworld.com/javaworld/jw-06-2001/jw-0622-filters.html Regards, Lipi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to limit time for Connector threads?
) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveCo ntext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:5 67) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:972) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:206) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:83 3) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC onnection(Http11Protocol.java:732) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:61 9) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:688) at java.lang.Thread.run(Thread.java:534) - Maybe it is important - yet another thread is always runnable: http8080-Processor44 daemon prio=1 tid=0x62bc9b88 nid=0x2a06 runnable [b73ff000..b73ff908] at java.net.PlainSocketImpl.socketAccept(Native Method) at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353) - locked 0x467ea0f0 (a java.net.PlainSocketImpl) at java.net.ServerSocket.implAccept(ServerSocket.java:448) at java.net.ServerSocket.accept(ServerSocket.java:419) at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(Defau ltServerSocketFactory.java:107) at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint. java:410) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:59 1) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool .java:688) at java.lang.Thread.run(Thread.java:534) Thank you for any suggestions, Lipi -Original Message- From: Antonio Fiol Bonnín [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 8:42 PM To: Tomcat Users List Subject: Re: How to limit time for Connector threads? Hi Yoav, What the original poster meant is not that there is a race condition in Tomcat, but in his own web application. Maybe we should try to point him into the direction of fixing the problem. So there I go: - When it hangs, if on Unix/Linux, kill -QUIT your Tomcat process, and you will get some stack traces. - Maybe they will tell you something. If they do, you're lucky. Otherwise, post them: maybe they will tell us something. At least, you will see how many threads there are, and their state (e.g. waiting for a lock). Good luck! Antonio Fiol Shapira, Yoav wrote: Hi, I highly doubt you've stumbled on a race condition in the tomcat connector implementation. Nonetheless, if you can supply a small WAR that leads to the problem you've described, we'll be glad to test it, and if your problem is reproducible rest assured it will be fixed immediately, as that would be more important than the other stuff currently open in bugzilla. Yoav Shapira Millennium Research Informatics -Original Message- From: rlipi [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 3:26 AM To: 'Tomcat Users List' Subject: RE: How to limit time for Connector threads? Yes, I did it. But it is not solution. Server doesn't answer slowly or for only some requests. It doesn't answer at all. It means that treads are not terminated and resources are not released. Sometimes, server doesn't answer without All threads are currently busy exception. That is why I think that the problem is some death lock. Lipi -Original Message- From: STOCKHOLM, Raymond [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 8:56 AM To: Tomcat Users List Subject: RE: How to limit time for Connector threads? Maybe you should increase the number of threads in your connector. check attribut maxProcessors in your server.xml In this example, I set it to 500 instead of 75 (default value) Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=30 maxProcessors=500 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / -Message d'origine- De : rlipi [mailto:[EMAIL PROTECTED] Envoyé : jeudi 6 mai 2004 08:40 À : 'Tomcat Users List' Objet : How to limit time for Connector threads? Hallo, is it possible in any way to limit time for threads that realize user requests? Sometimes (once a day in average), the Tomcat 5.0.19 server doesn't answers. The reason is in error message All threads are currently busy. Probably there is a bug in the web application. Some kind of synchronization death lock, I think. But localization of this bug is very hard. So, termination (and release of all resources) of long time
RE: How to limit time for Connector threads?
Hi Yoav and Antonio, I am not absolutely sure, but I think (with high probability) that the bug is in our application. I am not original author of this application but I have to take care about it. Now I know that there are some strangenesses in source code of this app. Yet one reason why I think that it is in our app. The server stops answer on http (but it still answers on https). It is still running. I have to stop it. During the standard stopping of server I can see message like Waiting for 175 instance(s) to be deallocated right after message about removing of this app. The problem began to occur when we started to use this app as the main web page. The app URL had been accessible for weeks before but only through the link from the old main web page. After that, the traffic has been multiplied (by 10 or 20). The problem occurs once a day (in average). But interesting is that it is not in time of the highest traffic. It occurs mainly in the morning or evening. I am going to try Antonio's proposal. Also I would like to try some profiling tool. But it will take a lot of time to find and repair something, I think. So, let's go back to my original question. I think that it is common situation that, due to the some mistake in source code, the execution of a request thread is very long or infinite. And the server should not to go down by this kind of mistakes. I send (in attachment) to you very simple example of it. Execution time of this example is about 100 seconds but imagine that it can be hours. I think that the server should stop this thread after some time period. Is this possible? How can I tell the server to do this? Thank you, Lipi -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 8:47 PM To: Tomcat Users List Subject: RE: How to limit time for Connector threads? Hi, What the original poster meant is not that there is a race condition in Tomcat, but in his own web application. I don't think so, but either one of us could be misinterpreting the original post. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to limit time for Connector threads?
I see that there is no source code in the mail attachment. So, here is the source code of loop.jsp: -- Start... % int limit = 100; for(int i = 0; i limit; i++) { System.out.println(Attempt number: + i); out.print(br); out.print(Attempt number: + i); out.flush(); try { Thread.sleep(1000); } catch(InterruptedException exc) {exc.printStackTrace();} } % ...End --- Regards, Lipi -Original Message- From: rlipi [mailto:[EMAIL PROTECTED] Sent: Friday, May 07, 2004 9:17 AM To: 'Tomcat Users List' Subject: RE: How to limit time for Connector threads? Hi Yoav and Antonio, I am not absolutely sure, but I think (with high probability) that the bug is in our application. I am not original author of this application but I have to take care about it. Now I know that there are some strangenesses in source code of this app. Yet one reason why I think that it is in our app. The server stops answer on http (but it still answers on https). It is still running. I have to stop it. During the standard stopping of server I can see message like Waiting for 175 instance(s) to be deallocated right after message about removing of this app. The problem began to occur when we started to use this app as the main web page. The app URL had been accessible for weeks before but only through the link from the old main web page. After that, the traffic has been multiplied (by 10 or 20). The problem occurs once a day (in average). But interesting is that it is not in time of the highest traffic. It occurs mainly in the morning or evening. I am going to try Antonio's proposal. Also I would like to try some profiling tool. But it will take a lot of time to find and repair something, I think. So, let's go back to my original question. I think that it is common situation that, due to the some mistake in source code, the execution of a request thread is very long or infinite. And the server should not to go down by this kind of mistakes. I send (in attachment) to you very simple example of it. Execution time of this example is about 100 seconds but imagine that it can be hours. I think that the server should stop this thread after some time period. Is this possible? How can I tell the server to do this? Thank you, Lipi -Original Message- From: Shapira, Yoav [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 8:47 PM To: Tomcat Users List Subject: RE: How to limit time for Connector threads? Hi, What the original poster meant is not that there is a race condition in Tomcat, but in his own web application. I don't think so, but either one of us could be misinterpreting the original post. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to limit time for Connector threads?
On Fri, 7 May 2004, rlipi wrote: | So, let's go back to my original question. I think that it is common | situation that, due to the some mistake in source code, the execution of | a request thread is very long or infinite. And the server should not to | go down by this kind of mistakes. You are coding in java. It is not possible to preemptively control a Thread's execution cycle, in particular its termination. Trust me - check it up - there are -no ways- to kill a Thread. The reasons behind this are complex - but revolves around the problem of leaving mutex-sections correctly (monitors) when terminating a Thread. Thus: code correct! (The JSR 121 will fix this proble: http://jcp.org/en/jsr/detail?id=121. The way they solve it, is that they in effect instantiate -an entirely new JVM- for each thing that must be terminatable.) Kind regards, Endre - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to limit time for Connector threads?
rlipi wrote: I am going to try Antonio's proposal. Also I would like to try some profiling tool. But it will take a lot of time to find and repair something, I think. If you are dealing with a programming error like an infinite loop or a deadlock, you may have better luck using a debugger, rather than a profiling tool :-) Most of the popular IDEs (JBuilder, Eclipse, Idea, etc) can do remote debugging, so you just need to start your server (or a copy of it) in debug mode and connect to it from the IDE. In case you do not have any IDE, my recommendation is Eclipse, as it is free and needs no complicated installation. In case you do not know how to use remote debugging, I am pretty sure you can search through the archives in this list, or do some googling ;-) Hope it helps you, Rodrigo Ruiz -- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.678 / Virus Database: 440 - Release Date: 06/05/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to limit time for Connector threads?
I haven't done this myself, but here is a link: http://marc.theaimsgroup.com/?l=tomcat-userm=107373227524598w=2 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 07, 2004 6:33 AM To: [EMAIL PROTECTED] Subject: AW: How to limit time for Connector threads? Hi Rodrigo, it is possible to debug a remote server in eclipse, which is not started in the ide? Do you have a link where I can find informations about this technique or a little bit time to explain it for me? Thanx Jens -Ursprüngliche Nachricht- Von: Rodrigo Ruiz [mailto:[EMAIL PROTECTED] Gesendet: Freitag, 7. Mai 2004 12:27 An: Tomcat Users List Betreff: Re: How to limit time for Connector threads? rlipi wrote: I am going to try Antonio's proposal. Also I would like to try some profiling tool. But it will take a lot of time to find and repair something, I think. If you are dealing with a programming error like an infinite loop or a deadlock, you may have better luck using a debugger, rather than a profiling tool :-) Most of the popular IDEs (JBuilder, Eclipse, Idea, etc) can do remote debugging, so you just need to start your server (or a copy of it) in debug mode and connect to it from the IDE. In case you do not have any IDE, my recommendation is Eclipse, as it is free and needs no complicated installation. In case you do not know how to use remote debugging, I am pretty sure you can search through the archives in this list, or do some googling ;-) Hope it helps you, Rodrigo Ruiz -- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.678 / Virus Database: 440 - Release Date: 06/05/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to limit time for Connector threads?
Maybe I have wrong idea about possibilities of debugging tools but I think that it will not help. We have above 100 000 hits a day and the problem occurs only once a day. It can be a result of one special request or (with greater probability) it is result of some combination of requests. In both cases I don't know these requests nor the particular place where the problem is. Therefore, I need some statistical information about server behavior before problem and/or all possible information about server status in the time of problem. Can debugger help me with this? Lipi -Original Message- From: Rodrigo Ruiz [mailto:[EMAIL PROTECTED] Sent: Friday, May 07, 2004 12:27 PM To: Tomcat Users List Subject: Re: How to limit time for Connector threads? rlipi wrote: I am going to try Antonio's proposal. Also I would like to try some profiling tool. But it will take a lot of time to find and repair something, I think. If you are dealing with a programming error like an infinite loop or a deadlock, you may have better luck using a debugger, rather than a profiling tool :-) Most of the popular IDEs (JBuilder, Eclipse, Idea, etc) can do remote debugging, so you just need to start your server (or a copy of it) in debug mode and connect to it from the IDE. In case you do not have any IDE, my recommendation is Eclipse, as it is free and needs no complicated installation. In case you do not know how to use remote debugging, I am pretty sure you can search through the archives in this list, or do some googling ;-) Hope it helps you, Rodrigo Ruiz -- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.678 / Virus Database: 440 - Release Date: 06/05/2004 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to limit time for Connector threads?
I don't think that a debugger will help much in this case. A profiler might help, if you can reproduce the error in a test environment. (see below) Some ideas: - Use the access log to try to reproduce the error in a test environment. (AFAIK apache jmeter has the ability to create a test case from an access log) If you can reproduce the error, try to cut down the test case to the bare minimum that exposes the problem, then you might have luck with a profiler. - Write a servlet filter that logs the processing time for each request. - Extend the filter to interrupt the current thread if it takes to long and dump some data. -Original Message- From: rlipi [mailto:[EMAIL PROTECTED] Sent: Friday, May 07, 2004 2:20 PM To: 'Tomcat Users List' Subject: RE: How to limit time for Connector threads? Maybe I have wrong idea about possibilities of debugging tools but I think that it will not help. We have above 100 000 hits a day and the problem occurs only once a day. It can be a result of one special request or (with greater probability) it is result of some combination of requests. In both cases I don't know these requests nor the particular place where the problem is. Therefore, I need some statistical information about server behavior before problem and/or all possible information about server status in the time of problem. Can debugger help me with this? - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to limit time for Connector threads?
A follow up to my previous mail. You may try following snippet. (I havn't tried it in a filter chain, so I'm not shure if the exception reaches the filter) InterruptTimer mTimer = new InterruptTimer(5000, 10); mTimer.start(); try { doChain() // Don't have the correct syntax at hand... } catch (??InterruptedIOException?? ex) { // Log what you think to be helpfull } mTimer.reset(); public class InterruptTimer extends Thread { long oEndTime = 0; int oSleepTime = 10; Thread oStartingThread = Thread.currentThread(); Thread oRunningThread = null; public InterruptTimer(int aLength, int aSleepTime) { // Both times are in ms oSleepTime = aSleepTime; oEndTime = System.currentTimeMillis() + aLength; } public void run() { oRunningThread = Thread.currentThread(); // Loop until the end time is reached or reset() was called. while (System.currentTimeMillis() oEndTime) { try { Thread.sleep(oSleepTime); } catch (InterruptedIOException ex) { } } if (oEndTime 0) { timeout(); } } public void reset() { oEndTime = 0; } public void timeout() { oStartingThread.interrupt(); } } -Original Message- From: Ralph Einfeldt Sent: Friday, May 07, 2004 7:12 PM To: Tomcat Users List Subject: RE: How to limit time for Connector threads? - Extend the filter to interrupt the current thread if it takes to long and dump some data. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to limit time for Connector threads?
Maybe you should increase the number of threads in your connector. check attribut maxProcessors in your server.xml In this example, I set it to 500 instead of 75 (default value) Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=30 maxProcessors=500 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / -Message d'origine- De : rlipi [mailto:[EMAIL PROTECTED] Envoyé : jeudi 6 mai 2004 08:40 À : 'Tomcat Users List' Objet : How to limit time for Connector threads? Hallo, is it possible in any way to limit time for threads that realize user requests? Sometimes (once a day in average), the Tomcat 5.0.19 server doesn't answers. The reason is in error message All threads are currently busy. Probably there is a bug in the web application. Some kind of synchronization death lock, I think. But localization of this bug is very hard. So, termination (and release of all resources) of long time threads can be a work around. Thank you for any suggestions, Lipi. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to limit time for Connector threads?
Yes, I did it. But it is not solution. Server doesn't answer slowly or for only some requests. It doesn't answer at all. It means that treads are not terminated and resources are not released. Sometimes, server doesn't answer without All threads are currently busy exception. That is why I think that the problem is some death lock. Lipi -Original Message- From: STOCKHOLM, Raymond [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 8:56 AM To: Tomcat Users List Subject: RE: How to limit time for Connector threads? Maybe you should increase the number of threads in your connector. check attribut maxProcessors in your server.xml In this example, I set it to 500 instead of 75 (default value) Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=30 maxProcessors=500 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / -Message d'origine- De : rlipi [mailto:[EMAIL PROTECTED] Envoyé : jeudi 6 mai 2004 08:40 À : 'Tomcat Users List' Objet : How to limit time for Connector threads? Hallo, is it possible in any way to limit time for threads that realize user requests? Sometimes (once a day in average), the Tomcat 5.0.19 server doesn't answers. The reason is in error message All threads are currently busy. Probably there is a bug in the web application. Some kind of synchronization death lock, I think. But localization of this bug is very hard. So, termination (and release of all resources) of long time threads can be a work around. Thank you for any suggestions, Lipi. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Vedr.: RE: How to limit time for Connector threads?
Hi Lipi, are you by any chance integrating Tomcat with IIS using JK2? And does the death lock occur whether you use port 80 or 8080? /Thomas rlipi [EMAIL PROTECTED] 06-05-2004 09:25 Besvar venligst til Tomcat Users List Til:'Tomcat Users List' [EMAIL PROTECTED] cc: Vedr.: RE: How to limit time for Connector threads? Yes, I did it. But it is not solution. Server doesn't answer slowly or for only some requests. It doesn't answer at all. It means that treads are not terminated and resources are not released. Sometimes, server doesn't answer without All threads are currently busy exception. That is why I think that the problem is some death lock. Lipi -Original Message- From: STOCKHOLM, Raymond [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 8:56 AM To: Tomcat Users List Subject: RE: How to limit time for Connector threads? Maybe you should increase the number of threads in your connector. check attribut maxProcessors in your server.xml In this example, I set it to 500 instead of 75 (default value) Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=30 maxProcessors=500 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / -Message d'origine- De : rlipi [mailto:[EMAIL PROTECTED] Envoyé : jeudi 6 mai 2004 08:40 À : 'Tomcat Users List' Objet : How to limit time for Connector threads? Hallo, is it possible in any way to limit time for threads that realize user requests? Sometimes (once a day in average), the Tomcat 5.0.19 server doesn't answers. The reason is in error message All threads are currently busy. Probably there is a bug in the web application. Some kind of synchronization death lock, I think. But localization of this bug is very hard. So, termination (and release of all resources) of long time threads can be a work around. Thank you for any suggestions, Lipi. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=Arial___ Vi gør opmærksom på, at denne e-mail kan indeholde fortrolig information. Hvis du ved en fejltagelse modtager e-mailen, beder vi dig venligst informere afsender om fejlen ved at bruge svar-funktionen. Samtidig beder vi dig slette e-mailen i dit system uden at videresende eller kopiere den. Selv om e-mailen og ethvert vedhæftet bilag efter vores overbevisning er fri for virus og andre fejl, som kan påvirke computeren eller it-systemet, hvori den modtages og læses, åbnes den på modtagerens eget ansvar. Vi påtager os ikke noget ansvar for tab og skade, som er opstået i forbindelse med at modtage og bruge e-mailen. ___ Please note that this message may contain confidential information. If you have received this message by mistake, please inform the sender of the mistake by sending a reply, then delete the message from your system without making, distributing or retaining any copies of it. Although we believe that the message and any attachments are free from viruses and other errors that might affect the computer or IT system where it is received and read, the recipient opens the message at his or her own risk. We assume no responsibility for any loss or damage arising from the receipt or use of this message. /FONT
RE: How to limit time for Connector threads?
Hi, I highly doubt you've stumbled on a race condition in the tomcat connector implementation. Nonetheless, if you can supply a small WAR that leads to the problem you've described, we'll be glad to test it, and if your problem is reproducible rest assured it will be fixed immediately, as that would be more important than the other stuff currently open in bugzilla. Yoav Shapira Millennium Research Informatics -Original Message- From: rlipi [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 3:26 AM To: 'Tomcat Users List' Subject: RE: How to limit time for Connector threads? Yes, I did it. But it is not solution. Server doesn't answer slowly or for only some requests. It doesn't answer at all. It means that treads are not terminated and resources are not released. Sometimes, server doesn't answer without All threads are currently busy exception. That is why I think that the problem is some death lock. Lipi -Original Message- From: STOCKHOLM, Raymond [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 8:56 AM To: Tomcat Users List Subject: RE: How to limit time for Connector threads? Maybe you should increase the number of threads in your connector. check attribut maxProcessors in your server.xml In this example, I set it to 500 instead of 75 (default value) Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=30 maxProcessors=500 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / -Message d'origine- De : rlipi [mailto:[EMAIL PROTECTED] Envoyé : jeudi 6 mai 2004 08:40 À : 'Tomcat Users List' Objet : How to limit time for Connector threads? Hallo, is it possible in any way to limit time for threads that realize user requests? Sometimes (once a day in average), the Tomcat 5.0.19 server doesn't answers. The reason is in error message All threads are currently busy. Probably there is a bug in the web application. Some kind of synchronization death lock, I think. But localization of this bug is very hard. So, termination (and release of all resources) of long time threads can be a work around. Thank you for any suggestions, Lipi. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Vedr.: RE: How to limit time for Connector threads?
Hi Thomas, the Tomcat isn't integrated to any web server. It runs alone. The problem occurs on both ports. In better words - the Tomcat is listening on the port 8080 but there is transparent redirect from 80 to 8080 in iptables. Radek -Original Message- From: Thomas Nybro Bolding [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 9:51 AM To: Tomcat Users List Subject: Vedr.: RE: How to limit time for Connector threads? Hi Lipi, are you by any chance integrating Tomcat with IIS using JK2? And does the death lock occur whether you use port 80 or 8080? /Thomas rlipi [EMAIL PROTECTED] 06-05-2004 09:25 Besvar venligst til Tomcat Users List Til:'Tomcat Users List' [EMAIL PROTECTED] cc: Vedr.: RE: How to limit time for Connector threads? Yes, I did it. But it is not solution. Server doesn't answer slowly or for only some requests. It doesn't answer at all. It means that treads are not terminated and resources are not released. Sometimes, server doesn't answer without All threads are currently busy exception. That is why I think that the problem is some death lock. Lipi -Original Message- From: STOCKHOLM, Raymond [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 8:56 AM To: Tomcat Users List Subject: RE: How to limit time for Connector threads? Maybe you should increase the number of threads in your connector. check attribut maxProcessors in your server.xml In this example, I set it to 500 instead of 75 (default value) Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=30 maxProcessors=500 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / -Message d'origine- De : rlipi [mailto:[EMAIL PROTECTED] Envoyé : jeudi 6 mai 2004 08:40 À : 'Tomcat Users List' Objet : How to limit time for Connector threads? Hallo, is it possible in any way to limit time for threads that realize user requests? Sometimes (once a day in average), the Tomcat 5.0.19 server doesn't answers. The reason is in error message All threads are currently busy. Probably there is a bug in the web application. Some kind of synchronization death lock, I think. But localization of this bug is very hard. So, termination (and release of all resources) of long time threads can be a work around. Thank you for any suggestions, Lipi. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] FONT SIZE=1 FACE=Arial___ Vi gør opmærksom på, at denne e-mail kan indeholde fortrolig information. Hvis du ved en fejltagelse modtager e-mailen, beder vi dig venligst informere afsender om fejlen ved at bruge svar-funktionen. Samtidig beder vi dig slette e-mailen i dit system uden at videresende eller kopiere den. Selv om e-mailen og ethvert vedhæftet bilag efter vores overbevisning er fri for virus og andre fejl, som kan påvirke computeren eller it-systemet, hvori den modtages og læses, åbnes den på modtagerens eget ansvar. Vi påtager os ikke noget ansvar for tab og skade, som er opstået i forbindelse med at modtage og bruge e-mailen. ___ Please note that this message may contain confidential information. If you have received this message by mistake, please inform the sender of the mistake by sending a reply, then delete the message from your system without making, distributing or retaining any copies of it. Although we believe that the message and any attachments are free from viruses and other errors that might affect the computer or IT system where it is received and read, the recipient opens the message at his or her own risk. We assume no responsibility for any loss or damage arising from the receipt or use of this message. /FONT - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to limit time for Connector threads?
Hi Yoav, What the original poster meant is not that there is a race condition in Tomcat, but in his own web application. Maybe we should try to point him into the direction of fixing the problem. So there I go: - When it hangs, if on Unix/Linux, kill -QUIT your Tomcat process, and you will get some stack traces. - Maybe they will tell you something. If they do, you're lucky. Otherwise, post them: maybe they will tell us something. At least, you will see how many threads there are, and their state (e.g. waiting for a lock). Good luck! Antonio Fiol Shapira, Yoav wrote: Hi, I highly doubt you've stumbled on a race condition in the tomcat connector implementation. Nonetheless, if you can supply a small WAR that leads to the problem you've described, we'll be glad to test it, and if your problem is reproducible rest assured it will be fixed immediately, as that would be more important than the other stuff currently open in bugzilla. Yoav Shapira Millennium Research Informatics -Original Message- From: rlipi [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 3:26 AM To: 'Tomcat Users List' Subject: RE: How to limit time for Connector threads? Yes, I did it. But it is not solution. Server doesn't answer slowly or for only some requests. It doesn't answer at all. It means that treads are not terminated and resources are not released. Sometimes, server doesn't answer without All threads are currently busy exception. That is why I think that the problem is some death lock. Lipi -Original Message- From: STOCKHOLM, Raymond [mailto:[EMAIL PROTECTED] Sent: Thursday, May 06, 2004 8:56 AM To: Tomcat Users List Subject: RE: How to limit time for Connector threads? Maybe you should increase the number of threads in your connector. check attribut maxProcessors in your server.xml In this example, I set it to 500 instead of 75 (default value) Connector className=org.apache.coyote.tomcat4.CoyoteConnector port=80 minProcessors=30 maxProcessors=500 enableLookups=true redirectPort=8443 acceptCount=100 debug=0 connectionTimeout=2 useURIValidationHack=false disableUploadTimeout=true / -Message d'origine- De : rlipi [mailto:[EMAIL PROTECTED] Envoyé : jeudi 6 mai 2004 08:40 À : 'Tomcat Users List' Objet : How to limit time for Connector threads? Hallo, is it possible in any way to limit time for threads that realize user requests? Sometimes (once a day in average), the Tomcat 5.0.19 server doesn't answers. The reason is in error message All threads are currently busy. Probably there is a bug in the web application. Some kind of synchronization death lock, I think. But localization of this bug is very hard. So, termination (and release of all resources) of long time threads can be a work around. Thank you for any suggestions, Lipi. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] smime.p7s Description: S/MIME Cryptographic Signature
RE: How to limit time for Connector threads?
Hi, What the original poster meant is not that there is a race condition in Tomcat, but in his own web application. I don't think so, but either one of us could be misinterpreting the original post. Yoav Shapira This e-mail, including any attachments, is a confidential business communication, and may contain information that is confidential, proprietary and/or privileged. This e-mail is intended only for the individual(s) to whom it is addressed, and may not be saved, copied, printed, disclosed or used by anyone else. If you are not the(an) intended recipient, please immediately delete this e-mail from your computer system and notify the sender. Thank you. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]