Hi ,

Sorry the log images was filtered out. you can look at the uploaded image.

http://imgur.com/a/Nxpcw

in text the logs say: I/O read timed out.

Thanks
Hassan

On Mon, Apr 17, 2017 at 1:35 PM, Gary Gregory <garydgreg...@gmail.com>
wrote:

> Hassan,
>
> Your attachments were filtered out. You might want to try an image sharing
> site.
>
> Gary
>
> On Mon, Apr 17, 2017 at 6:16 AM, Hassan Khan <hassankhan...@gmail.com>
> wrote:
>
> > +
> >>
> >
> >
> >> Hi All,
> >>
> >>
> >>
> >>    We are upgrading the httpclient in our software from 3.1 to 4.5 (we
> >> are adding both core and client). But we are having some issues in the
> >> client and server communications. We are using the below client code
> >> (simplified the code ) to make a  call every 60 secs and we are getting
> >> localhost not responding after few tries.
> >>
> >> Client code simplified is :
> >>
> >> RequestConfig config = RequestConfig.*custom*()
> >>
> >>               .setConnectTimeout(20 * 1000)
> >>
> >>               .setConnectionRequestTimeout(10* 60 * 1000)
> >>
> >>               .*setStaleConnectionCheckEnabled**(**true**)*
> >>
> >>               .setSocketTimeout(10 * 60 * 1000).build();
> >>
> >> *this*.client = HttpClients.*custom*().setDefaultRequestConfig(config
> >> ).build();
> >>
> >> HttpResponse response = client.execute(postMethod);
> >>
> >> *int* rc = response.getStatusLine().getStatusCode();
> >>
> >> *if* (rc > 200) {
> >>
> >>       log error
> >>
> >> }
> >>
> >> //using the object stream to read data..
> >>
> >> ois = *new* ObjectInputStream(response.getEntity().getContent());
> >>
> >> //at the end we close it
> >>
> >> postMethod.releaseConnection();
> >>
> >>
> >>
> >> But still we are getting the following issue:
> >>
> >>
> >> ​[image: cid:image003.png@01D2B446.A78B7290]
> >>
> >>
> >>
> >> Any recommendations would be appreciated. we have 2 thread making a
> >> request every 60 secs. When we used a spooling manager always one route
> was
> >> used..
> >>
> >     May be both thread that are calling the same URL simultaneously are
> > sharing one connection , but they should share different connections..
> >
> >>
> >>
> >> Thanks
> >>
> >>
> >>
> >> *Hassan Khan*
> >>
> >> Software Developer
> >>
> >>
> >
> >
> >
>
>
> --
> E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
> Java Persistence with Hibernate, Second Edition
> <https://www.amazon.com/gp/product/1617290459/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1617290459&
> linkCode=as2&tag=garygregory-20&linkId=cadb800f39946ec62ea2b1af9fe6a2b8>
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1617290459>
> JUnit in Action, Second Edition
> <https://www.amazon.com/gp/product/1935182021/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182021&
> linkCode=as2&tag=garygregory-20&linkId=31ecd1f6b6d1eaf8886ac902a24de418%22
> >
>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182021>
> Spring Batch in Action
> <https://www.amazon.com/gp/product/1935182951/ref=as_li_
> tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=1935182951&
> linkCode=%7B%7BlinkCode%7D%7D&tag=garygregory-20&linkId=%7B%
> 7Blink_id%7D%7D%22%3ESpring+Batch+in+Action>
> <http:////ir-na.amazon-adsystem.com/e/ir?t=garygregory-20&l=am2&o=1&a=
> 1935182951>
> Blog: http://garygregory.wordpress.com
> Home: http://garygregory.com/
> Tweet! http://twitter.com/GaryGregory
>



-- 
Hassan Khan

Reply via email to