[#78949] [Ruby trunk Feature#13095] [PATCH] io.c (rb_f_syscall): remove deprecation notice — kosaki.motohiro@...
Issue #13095 has been updated by Motohiro KOSAKI.
3 messages
2017/01/03
[#78997] [Ruby trunk Bug#13110] Byte-based operations for String — shugo@...
Issue #13110 has been updated by Shugo Maeda.
3 messages
2017/01/06
[#79228] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150] — Eric Wong <normalperson@...>
naruse@ruby-lang.org wrote:
5 messages
2017/01/23
[#79511] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150]
— Eric Wong <normalperson@...>
2017/02/13
Eric Wong <normalperson@yhbt.net> wrote:
[#79518] Re: [ruby-cvs:64576] naruse:r57410 (trunk): Prevent GC by volatile [Bug #13150]
— Nobuyoshi Nakada <nobu@...>
2017/02/13
On 2017/02/13 10:04, Eric Wong wrote:
[#79298] [Ruby trunk Bug#13085][Assigned] io.c io_fwrite creates garbage — nobu@...
Issue #13085 has been updated by Nobuyoshi Nakada.
3 messages
2017/01/29
[#79337] Re: [ruby-changes:45397] normal:r57469 (trunk): io.c: recycle garbage on write — SASADA Koichi <ko1@...>
Eric:
4 messages
2017/01/31
[#79352] Re: [ruby-changes:45397] normal:r57469 (trunk): io.c: recycle garbage on write
— Eric Wong <normalperson@...>
2017/01/31
SASADA Koichi <ko1@atdot.net> wrote:
[ruby-core:78978] [Ruby trunk Bug#13106] Timeout does not wait for more than 120 seconds
From:
gibu.john.george@...
Date:
2017-01-05 08:44:06 UTC
List:
ruby-core #78978
Issue #13106 has been reported by Gibu John George.
----------------------------------------
Bug #13106: Timeout does not wait for more than 120 seconds
https://bugs.ruby-lang.org/issues/13106
* Author: Gibu John George
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-linux]
* Backport: 2.2: UNKNOWN, 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Hi All,
I have encountered an issue where Timeout does not wait for more than 120 seconds when asked to wait for a greater period.
This is my ruby code, that supposed to wait for 250 seconds to check if an application deployed on tomcat is up or not. As seen in the logs, it exits are 120 seconds.
~~~ ruby
require 'timeout'
require 'socket'
require 'net/http'
ip = '127.0.0.1'
port = '8080'
url = 'http://127.0.0.1:8080/myApp/isUp'
def wait_till_port_open(ip, port)
TCPSocket.new(ip, port).close
puts "#{port} is open"
return true
rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Errno::EADDRNOTAVAIL
return false
end
def wait_till_port_close(ip, port)
TCPSocket.new(ip, port).close
puts "#{port} is open"
return false
rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH, Errno::EADDRNOTAVAIL
return true
end
def wait_till_app_up(url)
resp_code = Net::HTTP.get_response(URI.parse(url.to_s)).code
if resp_code.eql?('200')
puts 'Application is up'
return true
end
rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH
return false
end
begin
Timeout::timeout(250) do
until wait_till_port_open(ip, port)
end
end
rescue Timeout::Error
abort("Port #{port} not up after 250 seconds")
end
puts Time.now
begin
Timeout::timeout(250) do
until wait_till_app_up(url)
end
end
rescue Timeout::Error
puts Time.now
abort("Application #{url} not up after 250 seconds")
end
~~~
~~~ text
8080 is open
2017-01-05 13:58:49 +0530
sec : 250 -> added a puts at https://github.com/ruby/ruby/blob/0d74082eced0254a30b8f09a4d65fff357fdc6cd/lib/timeout.rb#L84 to ensure that value is correctly being passed.
2017-01-05 14:00:50 +0530
~~~
Why is this happening? Any fixes for this?
--
https://bugs.ruby-lang.org/
Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>