Skip to content

Possible Memory Leak - Connection Reaper #1679

Closed
@mtamassia

Description

@mtamassia

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

Metadata

Metadata

Assignees

Labels

closing-soonThis issue will close in 4 days unless further comments are made.investigatingThis issue is being investigated and/or work is in progress to resolve the issue.response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 10 days.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions