-
Notifications
You must be signed in to change notification settings - Fork 20
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Description
A new HttpClient is being created for each request, leading to an increasing number of threads. Specifying a thread pool alleviates the problem, but not completely. The issue happens because here a new HttpClient is built everytime.
Version of SDK
v0.3.1
Reproduction
Below is an example of how to reproduce the issue.
- Initialize OpenFgaClient with any set of configs;
- Invoke method OpenFgaClient#write(ClientWriteRequest request) multiple times;
- Notice that for every write call, a new thread is created. If you have 300k write calls, 300k threads are created, eventually running out of memory.
Expected behavior
It should not create a new thread for every request.
paulosuzart
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working