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

Thread leak in IdleConnectionMonitor in Versions 3.31.0 to 3.38.0 (fixed in 3.39.0) #587

Open
rkumarpa opened this issue Apr 3, 2024 · 0 comments
Labels
SDK Issue pertains to the SDK itself and not specific to any service

Comments

@rkumarpa
Copy link
Contributor

rkumarpa commented Apr 3, 2024

If you are using any OCI Java SDK version(s) >= 3.31.0 and <= 3.38.0 then you could see a thread leak in IdleConnectionMonitor. We recommend you to update to version 3.39.0 or later. If you are not using any of the affected OCI Java SDK versions, you can ignore this issue.

Description
When using OCI Java SDK version(s) >= 3.31.0 and <= 3.38.0, an increase in CPU or memory usage might occur due to the proliferation of threads of type idle-connection-monitor-thread. IdleConnectionMonitor was introduced in version 3.31.0 for each client to evict the idle and expired Apache connections and to restore connection re-use for the Apache connector. As each OCI Java SDK client spawns its own idle connection monitoring threads, these threads do not terminate unless the clients are closed (either by using "try-with-resources" or by calling the close() method). Over time, as more clients are created and not closed, the number of threads continues to grow, resulting in a build-up of unused threads and thus a thread leak.

Affected Versions

Actions
Update the OCI Java SDK version to 3.39.0 or later.

@rkumarpa rkumarpa added the SDK Issue pertains to the SDK itself and not specific to any service label Apr 3, 2024
@mricken mricken changed the title Thread leak in IdleConnectionMonitor Thread leak in IdleConnectionMonitor in Versions 3.31.0 to 3.38.0 (fixed in 3.39.0) Apr 4, 2024
@rkumarpa rkumarpa pinned this issue Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SDK Issue pertains to the SDK itself and not specific to any service
Projects
None yet
Development

No branches or pull requests

1 participant