hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joan Balagueró <joan.balagu...@grupoventus.com>
Subject RE: NO_HTTP_RESPONSE_EXCEPTION
Date Fri, 06 Feb 2009 17:41:09 GMT
Thanks Oleg. It seems strange to me because HttpClient3 (sending requests to
the same server) never fails. I'll take a look at the code again and I'll
comment you something else.

Just another question. When I modify a connection or response timeout
setting another value (for example, from 5000 to 2000) HttpClient4 applies
this new value correctly (as expected, obviously). But not the same with
maxConnections. If I set MaxConnections from 100 to 1 using
ConnManagerParams.setMaxTotalConnections, then:

DefaultHttpClient object --> DefaultParams --> parameters -->
http.conn-manager.max-total=1 --> OK!

But DefaultHttpClient object --> connManager --> connectionPool -->
maxTotalConnections still to 100 --> BAD!

And if I send 50 simultaneous request, HttpClient processes all of them even
with maxTotalConnections to 1.

Is this a bug? Or after "ConnManagerParams.setMaxTotalConnections" I must
set the new "param" values to the HttpClient object with
"this.objHttp.setParams(set the "params" object with the new value of
MaxConnections)"?

Thanks,

Joan.




-----Mensaje original-----
De: Oleg Kalnichevski [mailto:olegk@apache.org] 
Enviado el: viernes, 06 de febrero de 2009 17:34
Para: HttpClient User Discussion
Asunto: RE: NO_HTTP_RESPONSE_EXCEPTION

On Fri, 2009-02-06 at 13:44 +0100, Joan Balagueró wrote:
> Hello Oleg,
> 
> 
> This is the log. I sent 10 concurrent requests, and all of them failed
with
> HttpNoResponseException.
> 
> 
> Thanks for you help,
> 
> Joan.
>  

There is nothing wrong with packets generated by HttpClient. This
appears to be a server side issue. The target server fails to send any
valid response back and simply closes the connection.

Oleg


> -----Mensaje original-----
> De: Oleg Kalnichevski [mailto:olegk@apache.org] 
> Enviado el: jueves, 05 de febrero de 2009 21:44
> Para: HttpClient User Discussion
> Asunto: Re: NO_HTTP_RESPONSE_EXCEPTION
> 
> Joan Balagueró wrote:
> > Hello,
> > 
> >  
> > 
> > I’m sending requests to one server using HttpClient3 and HttpClient4.
> > 
> >  
> > 
> > HttpClient3 works well, but HttpClient4 fails randomly with an
> > ‘HttpNoResponseException’.
> > 
> > This is the trace:
> > 
> >  
> > 
> > org.apache.http.NoHttpResponseException: The target server failed to
> respond
> > 
> >         at
> >
>
org.apache.http.impl.conn.DefaultResponseParser.parseHead(DefaultResponsePar
> > ser.java:85)
> > 
> >         at
> >
>
org.apache.http.impl.io.AbstractMessageParser.parse(AbstractMessageParser.ja
> > va:174)
> > 
> >         at
> >
>
org.apache.http.impl.AbstractHttpClientConnection.receiveResponseHeader(Abst
> > ractHttpClientConnection.java:182)
> > 
> >         at
> >
>
org.apache.http.impl.conn.DefaultClientConnection.receiveResponseHeader(Defa
> > ultClientConnection.java:235)
> > 
> >         at
> >
>
org.apache.http.impl.conn.AbstractClientConnAdapter.receiveResponseHeader(Ab
> > stractClientConnAdapter.java:259)
> > 
> >         at
> >
>
org.apache.http.protocol.HttpRequestExecutor.doReceiveResponse(HttpRequestEx
> > ecutor.java:279)
> > 
> >         at
> >
>
org.apache.http.protocol.HttpRequestExecutor.execute(HttpRequestExecutor.jav
> > a:121)
> > 
> >         at
> >
>
org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDir
> > ector.java:410)
> > 
> >         at
> >
>
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja
> > va:555)
> > 
> >         at
> >
>
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja
> > va:487)
> > 
> >         at
> >
>
org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.ja
> > va:465)
> > 
> >         at
> >
com.vpfw.proxy.services.http.HttpService.sendRequest(HttpService.java:562)
> > 
> >  
> > 
> > Do you know if any other people has had a problem like this?
> > 
> >
> 
> Not to my best knowledge.
> 
> 
> Set 'org.apache.http' logging category to DEBUG and post the resulting 
> wire / context log to the list. I'll have a look.
> 
> Oleg
> 
> > 
> > Thanks,
> > 
> >  
> > 
> > Joan.
> > 
> > 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Mime
View raw message