Closed
Description
We have an application that creates and destroys EC2, S3, and several other SDK clients.
We build clients within a thread and close()
the clients within the thread. Example:
Ec2Client ec2Client = Ec2Client.builder().region(Region.of(currentRegion)).credentialsProvider(InstanceProfileCredentialsProvider.builder().build()).build();
// DO SOMETHING
ec2Client.close();
Memory consumption grows over time and here is a link to the memory heap dump, which is self explicatory: https://heaphero.io/my-heap-report.jsp?p=YXJjaGl2ZWQvMjAyMC8wMy8yLy0tbWVtb3J5LnppcC0xOS01NC0zMi5qc29uLS0=
Expected Behavior
client close()
should not be leaving resources behind
Current Behavior
Threads and their associated data should be removed upon calling a client close()
method
Your Environment
- OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
- SDK 2.10.77