Thanks Chris,

Very helpful advice.  I can't help but feel a little out of my depth
with this one :-\

On 19 February 2010 16:46, Christopher Schultz
<ch...@christopherschultz.net> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Chris,
>
> On 2/19/2010 11:08 AM, Chris Mannion wrote:
>> Thank, genuinely, for the responses, I've learned how I *could* set a
>> timeout, which I didn't know before.  However, what I'm actually
>> trying to get to the bottom of is what timeout could be in play
>> *without* me setting it.
>
> Well, try this:
>
> URLConnection t_connection = t_url.openConnection();
> System.out.println("Read timeout for URLConnection: " +
>            t_connection.getReadTimeout());
>
> That ought to tell you what the default read timeout is: the Java API
> doesn't specify what the default read timeout is, so it's up to the
> implementation to choose a default. I would expect that the default
> would be 0 (wait forever), but it might not be.
>
>> As I said, the connection is already timing out and I don't want it
>> to.
>
> It's possible that this exception is not accurately reporting the real
> problem. It might be something else happening that is triggering a
> ReadTimeoutException: check the source code for the HttpURLConnection
> class to see if any particular default read timeout is being set, and
> the code for the SocketInputStream class to.. oh, wait, that's a native
> method so you're out of luck, there.
>
>> Shouldn't the socket wait indefinitely for a response if nothing set
>> a finite timeout length?
>
> That's a reasonable expectation, but there's no documentation that says
> that behavior is the default.
>
>> This is code in an already release product so if I can track down an
>> environment setting that's governing the timeout then I can just
>> adjust that setting for the one customer with the problem rather than
>> having to patch the code and release it to everyone.
>
> I think you're going to require a patch, though it's possible that some
> of these defaults are settable via system properties, etc.
>
> I can't find any documentation for java.net.SocketInputStream: it must
> not be a public API. Yup:
>
> /**
>  * This stream extends FileInputStream to implement a
>  * SocketInputStream. Note that this class should <b>NOT</b> be
>  * public.
>  *
>  * @version     1.34, 12/19/03
>  * @author      Jonathan Payne
>  * @author      Arthur van Hoff
>  */
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkt+wF0ACgkQ9CaO5/Lv0PAtXACgnS7F/c/VAAa1baQiJMm7oXtm
> lNkAmwXP4ifzV/2xB6NID2ZMhQ7hoeLh
> =TKYk
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>



-- 
Chris Mannion
iCasework and LocalAlert implementation team
0208 144 4416

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

Reply via email to