Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: JRuby-OpenSSL 0.7, JRuby 1.6.7
-
Fix Version/s: JRuby 1.7.0.pre1
-
Component/s: Core Classes/Modules, OpenSSL
-
Labels:None
-
Environment:Hide$ ruby --version
jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (OpenJDK 64-Bit Server VM 1.6.0_23) [linux-amd64-java]
$ gem list
*** LOCAL GEMS ***
bouncy-castle-java (1.5.0146.1)
bundler (1.0.22)
jruby-openssl (0.7.6.1)
rake (0.8.7)Show$ ruby --version jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (OpenJDK 64-Bit Server VM 1.6.0_23) [linux-amd64-java] $ gem list *** LOCAL GEMS *** bouncy-castle-java (1.5.0146.1) bundler (1.0.22) jruby-openssl (0.7.6.1) rake (0.8.7)
-
Number of attachments :
Description
$ rvm use system $ ruby --version ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux] $ ruby server.rb & [1] 5924 Listening on port 8043 $ time curl -m 3 -k https://localhost:8043 "GET / HTTP/1.1\r\n" curl: (28) Operation timed out after 3001 milliseconds with 0 bytes received real 0m3.011s user 0m0.008s sys 0m0.012s $ time ruby client.rb "POST /foo HTTP/1.1\r\n" /usr/lib/ruby/1.8/timeout.rb:64:in `rbuf_fill': execution expired (Timeout::Error) from /usr/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill' from /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil' from /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline' from /usr/lib/ruby/1.8/net/http.rb:2028:in `read_status_line' from /usr/lib/ruby/1.8/net/http.rb:2017:in `read_new' from /usr/lib/ruby/1.8/net/http.rb:1051:in `request' from client.rb:38 from /usr/lib/ruby/1.8/net/http.rb:543:in `start' from client.rb:38 from /usr/lib/ruby/1.8/timeout.rb:67:in `timeout' from /usr/lib/ruby/1.8/timeout.rb:101:in `timeout' from client.rb:37 real 0m2.075s user 0m0.056s sys 0m0.012s $ rvm use jruby $ ruby --version jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (OpenJDK 64-Bit Server VM 1.6.0_23) [linux-amd64-java] $ gem list *** LOCAL GEMS *** bouncy-castle-java (1.5.0146.1) bundler (1.0.22) jruby-openssl (0.7.6.1) rake (0.8.7) $ time ruby client.rb "POST /foo HTTP/1.1\r\n" ^C real 0m24.111s user 0m5.460s sys 0m0.140s
For some background: sometimes a web service our app depends on gets restarted (or something), but the connections are not closed (or something). This causes our SOAP/HTTPS requests to hang (not do anything forever) and usually the stack trace looks like this:
I'm assuming the timeouts don't kick in (just like in the attached client.rb
). Since I don't have the skills to figure this out myself, I'm hoping someone can at least provide me with a work-around on how to make the timeout work.
Seems
JRUBY-5059(fixed) is a bit similar.