W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 1998

I found something!

From: Wolfgang Platzer <wplatzer@iaik.tu-graz.ac.at>
Date: Fri, 20 Feb 1998 08:24:40 +0100
Message-ID: <02dc01bd3dd0$9b6a0370$1cea1b81@kopernikus.iaik.tu-graz.ac.at>
To: "Jigsaw Mailinglist" <www-jigsaw@w3.org>
I found something concerning my Jigsaw problem where there are no free
SockClients left. A summeriziation of the Jigsaw ServerSocket implementation
lead to the following code:

try {

  // SocketClientFactory #547
  ServerSocket s = new ServerSocket(7070);

  // httpd #1382, 1383
  Socket as = s.accept();
  as.setTcpNoDelay(true);

  // SocketClient #114
  InputStream is = as.getInputStream();

  // MimeParser #177
  int i = is.read();

} catch (Exception ex) {
  System.out.println(ex.toString());
}

If now a browser connects to Jigsaw a new Socket is created. Then, after
some processing Jigsaw tries to read the first request. But if in the
meantime the browser was killed, or the network connection was lost due to
an error (often if you are using a modem) Jigsaw is anable to read a request
and therefore waits at line 177 in MimeParser.java forever.

You can check this by simply opening a telnet connection to Jigsaw:port
without sending any characters. The connection stays at least for 15 hours
(I checked it). Because the RequestTimeout is set not until a request has
been read (in ClientJava line 372 method processRequest) the request timeout
handling does not affect this problem.

I don't know if it was your intension, but you solved this problem in
Jigsaw1.0beta2. You added some debugging code to method bind in class
SocketClient:

 try {
     socket.setSoTimeout(300000); // FIXME for debugging only
 } catch (SocketException ex) {
     ex.printStackTrace();
 }

But this code causes the MimeParser in line 177 (  int i = is.read();) just
to wait until the Socket timeout has reached (5 min) and then correctly
throwing an IOException which closes the Socket and frees the SocketClient.

I tried to connect to Jigsaw1.0beta2 over a telnet connection again without
sending any characters. And after about 5 minutes "Connection closed by
foreign host." appeared.

Now everything should be O.K.!!!



Regards Wolfgang





--
Dipl.-Ing. Wolfgang Platzer
Technische Universitaet Graz - University of Technology Graz
Institut für Angewandte Informationsverarbeitung
und Kommunikationstechnologien
Klosterwiesgasse 32/I, A-8010 Graz,
Tel: ++43 316 873-5527,Fax: ++43 316 873-5520
URL <http://www.iaik.tu-graz.ac.at/index.html>
Received on Friday, 20 February 1998 02:26:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:27 GMT