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

Reuse OkHttpRequestHandler across multiple GeoApiContext's #771

Closed
moadi opened this issue Nov 19, 2021 · 1 comment
Closed

Reuse OkHttpRequestHandler across multiple GeoApiContext's #771

moadi opened this issue Nov 19, 2021 · 1 comment
Assignees

Comments

@moadi
Copy link

moadi commented Nov 19, 2021

Hello,

We're currently using this library across several of our services, and ran into resource exhaustion similar to what folks have reported in this issue.

Our services are in a monorepo and we provide a common class to initialize a GeoApiContext. In some legacy services, we can use different API keys for constructing this object within the same service. Now, instead of creating a new OkHttpRequestHandler for each unique API key, is it safe to create a single OkHttpRequestHandler for the instance/process and pass that to multiple GeoApiContext classes? We'll make sure to shutdown the handler when the process is terminating.

Thanks!

@moadi
Copy link
Author

moadi commented Nov 19, 2021

looked at the code, don't think I can do this.

@moadi moadi closed this as completed Nov 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants