Skip to content

Cache default certs store to prevent memory leaks - #625

Merged
TheSmartnik merged 1 commit into
jnunemaker:masterfrom
dalibor:cert_store
Jan 21, 2019
Merged

Cache default certs store to prevent memory leaks#625
TheSmartnik merged 1 commit into
jnunemaker:masterfrom
dalibor:cert_store

Conversation

@dalibor

@dalibor dalibor commented Nov 22, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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