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