Socket leak

Description

A WebClient is created for each call to makeOkapiRequest. This results in leak of sockets. They are closed probably at time of garbage collection which is not good enough. The problem has been seen in many other modules.

 

https://github.com/folio-org/mod-courses/blob/4401902d0d25334482afab2a8a46b48b91afd584/src/main/java/org/folio/coursereserves/util/CRUtil.java#L381

 

There is no webClient.close . This would prevent a leak, but make the HTTP communication much slower than it has to be.

 

Much better to use one WebClient per Vert.x instance (we have one) and the HTTP communication will use sockets from a shared pool.

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

defines

Checklist

hide

TestRail: Results

Activity

Show:
Done

Details

Assignee

Reporter

Priority

Story Points

Sprint

Development Team

Thor

Fix versions

RCA Group

Implementation coding issue

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created September 7, 2022 at 1:13 PM
Updated September 7, 2022 at 4:28 PM
Resolved September 7, 2022 at 4:28 PM
TestRail: Cases
TestRail: Runs