Hi Oleg, I think I can bring a bit of light to this matter.
1. httpclient5-5.0-beta3 / httpcore5-5.0-beta6 : I have changed my code to use a 'AbstractCharResponseConsumer' instead of the original ' AsyncResponseConsumer' (rest of code remains identical) and works perfectly. 2. I remembered some changes in the ' AsyncResponseConsumer', the 'consume' method now does not return a 'int'. So I tried to use the 'AsyncResponseConsumer' with httpclient5-5.0-beta2 / httpcore5-5.0-beta5 and also works perfectly. So it seems the 'AsyncResponseConsumer' works with the combination "httpclient5-5.0-beta2 / httpcore5-5.0-beta5", but not with the combination "httpclient5-5.0-beta3 / httpcore5-5.0-beta6". Does this help? Thanks, Joan. -----Original Message----- From: Oleg Kalnichevski [mailto:ol...@apache.org] Sent: Friday, April 5, 2019 9:31 AM To: HttpClient User Discussion <httpclient-users@hc.apache.org> Subject: Re: Socket timeout exception with HttpClient5 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:joan.balagu...@grupoventus.com] > Sent: Thursday, April 4, 2019 8:49 PM > To: 'HttpClient User Discussion' <httpclient-users@hc.apache.org> > 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:ol...@apache.org] > Sent: Thursday, April 4, 2019 8:31 PM > To: HttpClient User Discussion <httpclient-users@hc.apache.org> > 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:ol...@apache.org] > > Sent: Thursday, April 4, 2019 7:56 PM > > To: HttpClient User Discussion <httpclient-users@hc.apache.org> > > Subject: Re: Socket timeout exception with HttpClient5 > > > > On Thu, 2019-04-04 at 16:20 +0200, joan.balagu...@grupoventus.com > > 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: httpclient-users-unsubscr...@hc.apache.org > > For additional commands, e-mail: > > httpclient-users-h...@hc.apache.org > > > > > > > > > > ----------------------------------------------------------------- > > ---- > > To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org > > For additional commands, e-mail: > > httpclient-users-h...@hc.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org > For additional commands, e-mail: httpclient-users-h...@hc.apache.org > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org > For additional commands, e-mail: httpclient-users-h...@hc.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org