Questions tagged [apache-httpasyncclient]

HttpAsyncClient component of the Apache HttpComponents project.

92 questions
3
votes
0 answers

Apache Http Async Client 4.1.4 : Request cannot be executed; I/O reactor status: STOPPED

I am getting java.lang.IllegalStateException: Request cannot be executed; I/O reactor status: STOPPED when am trying to make Https request using closeableHttpClient.execute(request, null) java.lang.IllegalStateException: Request cannot be executed;…
3
votes
1 answer

org.apache.http.ConnectionClosedException: Connection closed - PoolingNHttpClientConnectionManager

We are getting the below error frequently in our production. The reason is, server closes the connection and the client is trying with half closed stale connection. we have eviction strategy which runs every 80 minutes periodically which will check…
3
votes
0 answers

Constructing a multipart request from InputStream with Apache Async HTTP Client

I am trying to send a multipart request through apache async http client, but getting a org.apache.http.ContentTooLongException: Content length is unknown error. I do understand why content length is required in an asynchronous model, but want to…
3
votes
1 answer

difference between timeout settings on RequestConfig and IOReactorConfig?

I am using Apache HTTP async client and I have to some configurations about it. I have the following code, but I am confused when setting RequestConfig and IOReactorConfig because you can specify the timeouts configs for both of them. My Question…
fluency03
  • 2,637
  • 7
  • 32
  • 62
3
votes
1 answer

Is there a difference between HttpAsyncClient and multithreaded Jsoup connection class?

I'm implementing a web scraper in Java. After playing a little with websites that I'm going to crawl, I want to use best practice for concurrent HTTP connections in Java. I'm currently using Jsoup's connection method. I'd like to know if it's…
3
votes
1 answer

MultipartFormEntity - Content too long

I'm using Java with HttpAsyncClient, and trying to make a post request to a server using multipart/form. There are two parameters: one is just a string, while the second one is a fie/byte array. When I need to perform requests with large size byte…
3
votes
2 answers

ElasticSearch and Apache HttpAsyncClient

I'm trying to use ElasticSearch REST API with Java Apache HttpAsyncClient library. I want to use persistent pipelining connection. Here is some test code (output is in comments): @Test public void testEsPipeliningClient() throws IOException,…
2
votes
0 answers

Apache http client with https proxy

I am using Apache HTTP Components HttpClient using the following code. HttpAsyncClientBuilder builder = HttpAsyncClients.custom(); builder.setConnectionManager(manager); builder.setRoutePlanner(planner) …
2
votes
0 answers

HttpAsyncClient 5 | Best recipe to handle Gzip content as response

from link we understand that automatic content decompression. is not supported. So is below recipe good way to handle the gzip content ? httpclient.execute(this.post, new FutureCallback() { @Override …
Bhuvan
  • 4,028
  • 6
  • 42
  • 84
2
votes
1 answer

Does Apache Commons HttpAsyncClient support GZIP?

This question was asked for Apache Commons HttpClient, however I'm using the async client HttpAsyncClient. Content decompression (gzip) does not work out of the box. I tried to configure it with: httpClientAsync = HttpAsyncClients.custom() …
Nikola Mihajlović
  • 2,286
  • 2
  • 19
  • 23
2
votes
0 answers

java.io.IOException: Connection reset by peer error for asynchronous http client calls

I am using the Apache http asynchronous client library to make parallel HTTP calls and receive the response on a callback. I am getting the following error after my request when the code is deployed on the server. java.io.IOException: Connection…
2
votes
1 answer

Need only the stream for response while using Apache Async http client

I am using Apache Async Http Client to download huge files from Azure Storage. This is the sample code I am using -> CloseableHttpAsyncClient httpclient = HttpAsyncClients.createDefault(); httpclient.execute(request, new…
2
votes
0 answers

Apache HttpAsyncClient Reading of Response?

private void init() { #Reactor ioReactorConfig = IOReactorConfig.custom() .setIoThreadCount(Runtime.getRuntime().availableProcessors()) .setConnectTimeout(30000) …
jily
  • 344
  • 2
  • 11
2
votes
1 answer

CloseableHttpAsyncClient terminates with ConnectionClosedException: Connection closed unexpectedly

I am working on a file downloader that submits get requests for around thousand files. I came across this article that would aid in submitting a lot of requests using the executor framework. I tried running a smaller number of files (around a…
dmachop
  • 824
  • 1
  • 21
  • 39
2
votes
2 answers

Apache HttpAsyncClient memory leak

I need to use HttpAsyncClient under the high load. I create HttpAsyncClient like this: RequestConfig requestConfig = RequestConfig.custom() .setConnectTimeout(CONNECT_TIMEOUT) .setSocketTimeout(SOCKET_TIMEOUT) …