W3C home > Mailing lists > Public > www-jigsaw@w3.org > March to April 2000

connections, deadlocks

From: Corey Wineman <cwineman@perseus.anserwv.org>
Date: Thu, 27 Apr 2000 10:41:50 -0400
Message-ID: <001801bfb056$bedd1860$081d4781@anserwv.org>
To: <www-jigsaw@w3.org>

I am trying to use the HTTP client classes and am having a few problems. A
few days ago a asked a question about deadlocks that happen when trying to
get connections. Following someones' suggestion, I downloaded some newer
versions and the problem seemed to go away. Now its back. Whenever I hit the
point in HttpBasicServer.getConnection() where it has to wait for an
available connection, it waits forever. What is causing this to happen? What
is happening to my connections? Say I set the connection pool to one. Is
there anything that I can do to make sure that the connection closes
properly and can be reused? What is monitoring those connections and how
does the monitor determine that a connection is okay to be reused?

Also, I have a question that I think I know the answer to. When creating a
Socket, is there anyway to control how long it will attempt to make a
connection. If you try to create a socket to a bogus site, you will get a
NoRouteToHostException( or something like that), but it takes several
minutes for the exception to come up. Can you set a timeout for the initial
connection? I believe the setTimeout only works a successful initial
connection. My guess is that the answer is no. I think you have to try to
make the connection in a separate thread and then put a timer on it.

Received on Thursday, 27 April 2000 10:40:17 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:41:28 UTC