You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using Excon to make HTTPS calls I noticed a lot of blocking in initializing the SSL certificates. In particular, each new connection calls OpenSSL::X509::Store.new. The locking seems to predominately occur in org.jruby.ext.openssl.x509store.Store.addCertificate. Since the same, default certificates are being used, perhaps a cheap way out is to cache that store.
A reproduction case is:
require 'excon'
# Call once so the hostname gets cached once, otherwise you might deadlock.
Excon.get('https://google.com/')
threads = []
100.times do
threads << Thread.new do
Excon.get('https://google.com/')
end
end
threads.each(&:join)
If you look at the stack dump for that, you'll see a lot of blocked threads.
The text was updated successfully, but these errors were encountered:
@nirvdrum those parts seem (unfortunately - for me) closely modelled after C code ... have to say they caught my eye - would be definitely great to refactor them - but I do not feel like going into that, since that might end up in a few weeks! also there's a lot of work to be done to make things correct for now ...
When using Excon to make HTTPS calls I noticed a lot of blocking in initializing the SSL certificates. In particular, each new connection calls
OpenSSL::X509::Store.new
. The locking seems to predominately occur inorg.jruby.ext.openssl.x509store.Store.addCertificate
. Since the same, default certificates are being used, perhaps a cheap way out is to cache that store.A reproduction case is:
If you look at the stack dump for that, you'll see a lot of blocked threads.
The text was updated successfully, but these errors were encountered: