6

Here's the code I am using

AsyncHttpClient asyncHttpClient = asyncHttpClient();
RequestBuilder builder = new RequestBuilder("PUT");
Request request = builder.setUrl("http://localhost:8080")
        .setBody(requestBody)
        .build();

asyncHttpClient.executeRequest(request, new AsyncCompletionHandler<Object>() {
  @Override
  public Object onCompleted(Response response) throws Exception {
    System.out.println(response.getStatusCode());
    return response;
  }
});

The code run correctly and the response is printed out BUT the debugging logs keep printing this log

2018-09-19 10:48:43.465 DEBUG 73969 --- [pool-7-thread-1] o.a.netty.channel.DefaultChannelPool : Entry count for : http://localhost:8080 : 1

Any idea why this logs will keep being printed for while AFTER the request is done?

Basemm
  • 1,204
  • 14
  • 16

2 Answers2

5

It is just debugging information about the state of the channel pool.

You can ignore it, or change the log level, or (if the previous options are not what you want to do) selectively change the log level for the org.asynchttpclient.netty.channel.DefaultChannelPool class.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
0

Review your logs looking for a BufferOverflowException.

If you are getting that exception means the pool is been overloaded with requests then review Pool overflow and the max-open-requests setting, in other way the Stephen C answer is enough