Done
Details
Assignee
Adam DickmeissAdam DickmeissReporter
Adam DickmeissAdam DickmeissPriority
P2Story Points
1Sprint
NoneDevelopment Team
ThorFix versions
RCA Group
Implementation coding issueTestRail: Cases
Open TestRail: CasesTestRail: Runs
Open TestRail: Runs
Details
Details
Assignee
Adam Dickmeiss
Adam DickmeissReporter
Adam Dickmeiss
Adam DickmeissPriority
Story Points
1
Sprint
None
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
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.