Skip to content

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

Open
@rkumarpa

Description

@rkumarpa

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    SDKIssue pertains to the SDK itself and not specific to any service

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions