Thread pool using memory

111 views
Skip to first unread message

Diego Molina

unread,
Mar 1, 2021, 10:21:51 AM3/1/21
to asynchttpclient
Hi,

We are using this http client at the Selenium project, we switched to Netty and we found this client's implementation suitable for what we want to do.

When doing requests, we block on the future because that is the nature of WebDriver commands, they basically follow a request-response pattern before the client sending requests can move to the next step.

We saw that memory usage went up and we identified several AsyncHttpClient threads using memory.

After checking the README and some messages in the Google group, we saw that it is better to use a single client instance and reuse it, so we did that. This improved things a little.

However, the thread pool grows until # of processors * 2, and still the memory is never released. To be more detailed, memory is used up to the point where the thread pool is full, after that it kind of stays stable.

Nevertheless, when the application using the http client is idle, one would expect to see the memory being claimed by the garbage collector, and this does not happen.

Do you have any advice to reclaim the used memory by the thread pool? Or is this a matter of finding the right pool size through "setIoThreadsCount()"?

Thanks in advance for your help,

Diego
Reply all
Reply to author
Forward
0 new messages