-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ravi,

On 2/10/16 1:43 AM, Ranjan, Ravi wrote:
> Yes the stack trace was taken on server.

> Anyway thanks for your valuable replies, I will continue my
> research in this direction. Since tomcat is out of picture now, I
> will concentrate on my external Process or any redesign that might
> be required. I will share my findings, if hopefully I am able to
> crack this one.

It's not rocket science: just set a connection/read timeout on the
HTTP client. Something like this:

AbstractHttpMessage message = <your HTTP message>;
HttpParams params=message.getParams();
HttpConnectionParams.setConnectionTimeout(params, 5000); // 5s
HttpConnectionParams.setSoTimeout(params, 5000); // 5s

Hope that helps,
- -chris

> -----Original Message----- From: Christopher Schultz
> [mailto:ch...@christopherschultz.net] Sent: Tuesday, February 09,
> 2016 7:42 PM To: Tomcat Users List Subject: Re: Tomcat 6 | Tomcat
> with APR causing Thread Blocking
> 
> Ravi,
> 
> On 2/9/16 7:10 AM, Ranjan, Ravi wrote:
>> HI Chris,
> 
>> Sorry for a delayed response. Here is few information that you 
>> asked for: 1.        Tomcat Native Library version is 1.1.30 and APR 
>> version is 1.4.8 2.  I am running my tomcat 6.0.41 on Windows 7 
>> system with Java 7.
> 
>> As you said that if APR is not available the Java BIO (blocking 
>> I/O) connector will be used. For me this connector is working. I
>> am still not able to pinpoint to exact difference between these
>> two types of connectors, which might be causing/solving the
>> issue.
> 
>> Here is the thread dump for the stuck thread:
> 
>> "http-8080-2" - Thread t@55 java.lang.Thread.State: RUNNABLE at 
>> java.net.SocketInputStream.socketRead0(Native Method) at 
>> java.net.SocketInputStream.read(SocketInputStream.java:152) at 
>> java.net.SocketInputStream.read(SocketInputStream.java:122) at 
>> java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
>> at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
>> - locked <1559b4d1> (a java.io.BufferedInputStream) at 
>> org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java:
7
>
>> 
7)
> 
> This
> 
> stack trace was taken on the server, not the client, right?
> 
> If so, this has nothing whatsoever to do with Tomcat. This is a
> problem with your web application making a connection to an outside
> service that is taking a long time to respond.
> 
> Set your timeouts appropriately and you won't have this stuck
> thread anymore. But you will have to handle error situations, of
> course.
> 
> -chris
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> _____________ The information contained in this message is
> proprietary and/or confidential. If you are not the intended
> recipient, please: (i) delete the message and all copies; (ii) do
> not disclose, distribute or use the message in any manner; and
> (iii) notify the sender immediately. In addition, please be aware
> that any message addressed to our domain is subject to archiving
> and review by persons other than the intended recipient. Thank
> you.
> 
> ---------------------------------------------------------------------
>
> 
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAla7VcAACgkQ9CaO5/Lv0PAwrACeOZXkok7crxHSYO/jHO9mZuOX
LioAn35Kd4PPQ3jrmdUBg89L8t/gMcmt
=W3QV
-----END PGP SIGNATURE-----

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

Reply via email to