On Thu, 2019-04-04 at 22:35 +0200, Joan grupoventus wrote:
> Hi Oleg,
> 
> Links to 2 log files, one against a https endpoint and another one
> against a http endpoint:
> 
> https endpoint:
> http://www.grupoventus.com/download/httpClient5_https.log
> 
> http endpoint:
> http://www.grupoventus.com/download/httpClient5_http.log
> 
> 
> Thanks,
> Joan.
> 

Joan,

I see nothing in the logs other than the server not sending more data.
There are no timestamps, so I cannot say how long it took between
events in the log.

Please upgrade to HttpClient 5.0-beta4 (you will have to build it from
source or wait a few days before it becomes available in Maven Central)
and re-run the application with the logging on. I will also need to see
your code. A test app reproducing the issue would probably be the best.


https://github.com/apache/httpcomponents-client/releases/tag/5.0-beta4-RC1

Oleg

> -----Original Message-----
> From: Joan grupoventus [mailto:[email protected]] 
> Sent: Thursday, April 4, 2019 8:49 PM
> To: 'HttpClient User Discussion' <[email protected]>
> Subject: RE: Socket timeout exception with HttpClient5
> 
> Hi Oleg,
> 
> Attached the http client log (finally) for one request that ends up
> with Socket timeout.
> 
> Thanks,
> 
> Joan.
> 
> -----Original Message-----
> From: Oleg Kalnichevski [mailto:[email protected]]
> Sent: Thursday, April 4, 2019 8:31 PM
> To: HttpClient User Discussion <[email protected]>
> Subject: Re: Socket timeout exception with HttpClient5
> 
> On Thu, 2019-04-04 at 20:08 +0200, Joan grupoventus wrote:
> > Hi Oleg,
> > 
> > I will not be able to do much without a context / wire log or a
> > test 
> > application reproducing the issue.
> > 
> > --> Yes, I am aware of this ... I'm getting crazy trying to log the
> > http traffic, no success. That's why I was asking you if you saw 
> > something incorrect in our appender/logger config.
> > 
> > Is the logger name "org.apache.hc" right?
> 
> Yes, this looks correct as well as the rest of log4j2 config but I am
> no log4j2 specialist.
> 
> Oleg
> 
> >  With HttpClient 4 I was using "org.apache.http.impl.conn" , 
> > "org.apache.http.impl.client" and "org.apache.http.client".
> > 
> > Thanks,
> > 
> > Joan.
> > 
> > -----Original Message-----
> > From: Oleg Kalnichevski [mailto:[email protected]]
> > Sent: Thursday, April 4, 2019 7:56 PM
> > To: HttpClient User Discussion <[email protected]>
> > Subject: Re: Socket timeout exception with HttpClient5
> > 
> > On Thu, 2019-04-04 at 16:20 +0200, [email protected]
> > wrote:
> > > Hello Oleg,
> > > 
> > > I've come across with the following issue. Our application is 
> > > contacting with a webservice that returns information about the 
> > > requested hotels.
> > > More hotels in the request, bigger the response size. This issue 
> > > happens using both https or http.
> > > 
> > > Below the results of the test using curl, httpAsync 4.1.3 and
> > > httpclient5-5.0-beta3 with httpcore5-5.0-beta6 (all tests
> > > executed 
> > > on the same server):
> > > 
> > > 1) Using curl:
> > > 
> > > 1 hotel -> 200 OK : 37K : 1.2s
> > > 2 hotels --> 200 OK : 74K : 1.4s
> > > 3 hotels --> 200 OK : 102K : 1.5s
> > > 
> > > 
> > > 2) Using HttpAsync 4.1.3:
> > > 
> > > 1 hotel -> 200 OK : 37K : 1.2s
> > > 2 hotels --> 200 OK : 74K : 1.4s
> > > 3 hotels --> 200 OK : 102K : 1.5s
> > > 
> > > 
> > > 3) Using HttpClient5:
> > > 
> > > 1 hotel -> 200 OK : 37K : 1.3s
> > > 2 hotels --> Socket Timeout
> > > 3 hotels --> Socket Timeout
> > > 
> > > 
> > > The socket timeout error trace is:
> > > 
> > > java.net.SocketTimeoutException: 15,000 MILLISECONDS
> > >          at
> > > 
> > 
> > ...
> > 
> > > I'm trying to debug, but I'm not able to log anything into the
> > > http 
> > > client log. The log file is created but nothing is logged. I'm
> > > using
> > > log4j2 in this way:
> > > 
> > > <!-- HTTP log for debug purposes --> <File name="HTTP_LOG" 
> > > fileName="${sys:log.dir}httpClient5.log"
> > > append="true" immediateFlush="true"> <PatternLayout> 
> > > <Pattern>%m%n</Pattern> </PatternLayout> </File>
> > > 
> > > <!-- HTTP enable logging -->
> > > <Logger name="org.apache.hc" level="debug"
> > > includeLocation="false" 
> > > additivity="false">
> > > <AppenderRef ref="HTTP_LOG"/>
> > > </Logger>
> > > 
> > > 
> > > 
> > > I'm logging correctly into another log files using identical 
> > > configuration ... What's wrong in this log4j2 configuration?
> > > 
> > > I have executed this test several times (request with 3 hotels)
> > > ...
> > > it
> > > seems to always stop after reading more than (or around) 64K of 
> > > data.
> > > 
> > > If I could debug I would be able to give more information.
> > > 
> > 
> > Hi Joan
> > 
> > I will not be able to do much without a context / wire log or a
> > test 
> > application reproducing the issue.
> > 
> > Oleg
> > 
> > 
> > 
> > -----------------------------------------------------------------
> > ----
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: 
> > [email protected]
> > 
> > 
> > 
> > 
> > -----------------------------------------------------------------
> > ----
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: 
> > [email protected]
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to