How to fix a deadlock caused by open
I have is a deadlock, but I am not using any threads in my program. Plus, the error only happens about once every 1000 to 1500 function calls, making it very difficult to pinpoint and correct. Here is the complete error message when the issue occurs: /usr/lib/ruby/2.3.0/timeout.rb:95:in `join': No live threads left. Deadlock? (fatal) from /usr/lib/ruby/2.3.0/timeout.rb:95:in `ensure in block in timeout' from /usr/lib/ruby/2.3.0/timeout.rb:95:in `block in timeout' from /usr/lib/ruby/2.3.0/timeout.rb:101:in `timeout' from /usr/lib/ruby/2.3.0/net/http.rb:878:in `connect' from /usr/lib/ruby/2.3.0