You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2017/02/15 09:35:41 UTC

[jira] [Resolved] (HTTPCLIENT-1814) NoHttpResponseException occuring randomly

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-1814.
-------------------------------------------
    Resolution: Information Provided

NoHttpResponseException basically means that the origin server or any of intermediate proxy hops dropped connection without returning a valid response. This is as much a server side issue as it is client side.

One can mitigate the problem by combination of these measures
#1 validating persistent connections when leased from the connection pool
#2 limiting total time to live (TTL) of persistent connections 
#3 evicting persistent connections from the connection pool after a certain period of inactivity
#4 automatically re-trying safe requests.

Please send your further inquiries to the user list. JIRA is an issue tracker, not a forum.

Oleg

> NoHttpResponseException occuring randomly
> -----------------------------------------
>
>                 Key: HTTPCLIENT-1814
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1814
>             Project: HttpComponents HttpClient
>          Issue Type: Test
>         Environment: Unix
>            Reporter: shikhi shekhar
>            Priority: Minor
>         Attachments: CustomHttpRequestRetryHandler.txt, TestHttpConnectionManager.txt
>
>
> Situation - I was previously using commons-httpclient 3.1 version and wanted to upgrade to httpclient 4.5.2 couple of months back.
> Action - I configured the httpClient (Config file is attached) my application.
> Problem - I am randomly getting NoHttpResponseException and its hard to replicate in local environment / debug mode.
> Below is how errors look like
> org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://test.example.com/test-services/serviceOneTest":test.example.com:443 failed to respond; nested exception is org.apache.http.NoHttpResponseException: test.example.com:443 failed to respond
> Steps to resolve the issue based on online research and what other developers have faced previously were I included setting of retry count and validateAfterInactivity in configuration java class. It reduced the number of exceptions but till 0.15% (actual requests 200,000) of requests fails with this error.
> Questions.
> 1. Is there any thing obvious I am missing in configuration of httpclient.
> 2. Or What would be a good way to replicate the problem in local. So that I can provide you with more data.
> 3. Can you guide us to right direction. 
> Let me know if you need any further details. Would be happy to provide you
> Thanks 



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

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