hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: SocketTimeoutExeption in ElementalHttpServer
Date Wed, 05 Dec 2007 13:20:10 GMT

On Wed, 2007-12-05 at 12:57 +0100, Johannes Koch wrote:
> When running the org.apache.http.examples.ElementalHttpServer with Java 
> 1.4.2_16, I get the following SocketTimeoutException when requesting a 
> resource with my browser:
> 
> I/O error: Read timed out
> java.net.SocketTimeoutException: Read timed out
> 	at java.net.SocketInputStream.socketRead0(Native Method)
> 	at java.net.SocketInputStream.read(SocketInputStream.java:129)
> 	at 
> org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)
> 	at 
> org.apache.http.impl.io.AbstractSessionInputBuffer.readLine(AbstractSessionInputBuffer.java:191)
> 	at 
> org.apache.http.impl.io.HttpRequestParser.parseHead(HttpRequestParser.java:71)
> 	at 
> org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.java:174)
> 	at 
> org.apache.http.impl.AbstractHttpServerConnection.receiveRequestHeader(AbstractHttpServerConnection.java:141)
> 	at org.apache.http.protocol.HttpService.handleRequest(HttpService.java:135)
> 	at 
> org.apache.http.examples.ElementalHttpServer$WorkerThread.run(ElementalHttpServer.java:250)
> 
> 
> In the code only added
> 
>      ex.printStackTrace();
> 
> to the catch block in WorkerThread.run():
> 
> catch (IOException ex) {
>      System.err.println("I/O error: " + ex.getMessage());
> }

Johannes,

I think this is perfectly normal. The ElementalHttpServer shuts down
connections after 5 seconds of inactivity. Why do you see this as a
problem?

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpcomponents-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpcomponents-dev-help@jakarta.apache.org


Mime
View raw message