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

Cache default certs store to prevent memory leaks #625

Merged
merged 1 commit into from
Jan 21, 2019

Conversation

dalibor
Copy link
Contributor

@dalibor dalibor commented Nov 22, 2018

This was causing me trouble for a while until I figured it out. Interestingly, it's the same issue that's been addressed in Faraday a while ago that I ran into as well and resolved with an upgrade.

The problem is that when doing HTTPS requests the cert store is reinitialized over and over again and we're seeing huge memory leaks in our application over time.

@TheSmartnik
Copy link
Collaborator

@dalibor awesome, thanks!
Just tested in a console and it seems that initialization of OpenSSL::X509::Store is rather memory consuming.

@TheSmartnik TheSmartnik merged commit 43519c4 into jnunemaker:master Jan 21, 2019
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

Successfully merging this pull request may close these issues.

2 participants