async-http-client icon indicating copy to clipboard operation
async-http-client copied to clipboard

Memory leak caused by re-scheduling CookieEvictionTask

Open zmarushchak-hs opened this issue 4 years ago • 1 comments

We are using DefaultAsyncHttpClient for making calls. CookieEvictionTask is started each time DefaultAsyncHttpClient is constructed. This task is re-scheduled on each run and is not deleted from timer list even when client is closed. So, once started, it is re-scheduled forever, causing memory leak if timer is opened/closed. Our application opens/closes client for each thread, causing timer instance to occupy 1.7Gb after running for a few days.

zmarushchak-hs avatar Jan 11 '21 11:01 zmarushchak-hs

@zmarushchak-hs Thanks for opening up this request! A bit of a backlog before this request, but duly noted and will circle back to investigate when time permits. Trying to onboard another person to help out at the moment, hope he can take a look to.

Feel free to ping if you don't hear back from me.

TomGranot avatar Jan 11 '21 19:01 TomGranot