1

I use Apache httpasyncclient 4.1, in jconsole, I found that direct memory is continuously growing, I tried force gc, do not work.

And what confused me is that I do not use DirectByteBufferAllocator.

ManagedNHttpClientConnectionFactory connFactory = new ManagedNHttpClientConnectionFactory(null,
            null, HeapByteBufferAllocator.INSTANCE);
connManager = new PoolingNHttpClientConnectionManager(ioreactor, connFactory,
            socketFactoryRegistry, new DNSResolverWithCache(dnsCache));

I also grep the httpclient httpasynclient httpcore httpcore-nio's source code, only in the DirectByteBufferAllocator has the method allocateDirect (1024).

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
skyblue
  • 51
  • 6

0 Answers0