Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Using SDK for Java 2.x Upload stream of unknown size not close "AwsEventLoop" thread. #6440

Open
brunoyuri1 opened this issue May 8, 2024 · 0 comments
Assignees

Comments

@brunoyuri1
Copy link

Expected behavior

After send data using the stream to S3, the AwsEventLoop thread need to be close to free resources.

Actual behavior

Following the example provided at Amazon S3 User Guide, I successfully uploaded a stream of unknown size to Amazon S3. However, upon analyzing the process with VisualVM, I observed that the internal threads created by the AWS SDK do not close after the upload completes. Specifically, the threads labeled 'AwsEventLoop' continue to run indefinitely.

I am concerned because I am creating a web application using Spring that will send several files via stream to S3, and over time, if the threads are not released, it could cause memory issues

Screenshot 2024-05-07 214012

Steps to reproduce

1. Create an application capable of sending a stream of data to Amazon S3. Use the provided example as a reference:: https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/s3/src/main/java/com/example/s3/async/PutObjectFromStreamAsync.java
2. Ensure the application can send multiple streams concurrently or sequentially.
3. Utilize VisualVM to monitor the application's threads. It has been observed that the AwsEventLoop threads do not terminate upon completion of their tasks. Attempting to send additional files results in the creation of new threads, leading to potential resource allocation issues as resources are not being released.

Logs / stacktrace (if applicable)

No response

Which SDK were you using?

Java (v2)

Which OS were you using?

Windows

SDK version

2.25.23

OS version

Windows 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants