Timeout::Error

3 views
Skip to first unread message

cumom

unread,
Feb 10, 2010, 9:47:42 AM2/10/10
to Ruby FS Stack
Is there a good way to adjust the timeout? The following URL takes 70
seconds in my browser (these are all OLD people):

https://api.familysearch.org/familytree/v2/person/KNCG-QGJ,2WHX-2KN,K19C-S9Z,K19C-3DV,2Z9X-1YK,27B2-Y74,2ZV5-LYJ,KN6H-5YY,2ZSC-275,2HSD-NNB?families=all&children=all&events=summary&parents=summary&sessionId=

This is what happens in ruby

Timeout::Error (execution expired):
/usr/lib/ruby/1.8/timeout.rb:54:in `rbuf_fill'
/usr/lib/ruby/1.8/timeout.rb:56:in `timeout'
/usr/lib/ruby/1.8/timeout.rb:76:in `timeout'
/usr/lib/ruby/1.8/net/protocol.rb:132:in `rbuf_fill'
/usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
/usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
/usr/lib/ruby/1.8/net/http.rb:2020:in `read_status_line'
/usr/lib/ruby/1.8/net/http.rb:2009:in `read_new'
/usr/lib/ruby/1.8/net/http.rb:1050:in `request'
/usr/lib/ruby/gems/1.8/gems/ruby-fs-stack-0.4.3/lib/ruby-fs-stack/
fs_communicator.rb:82:in `get'
/usr/lib/ruby/1.8/net/http.rb:543:in `start'
/usr/lib/ruby/gems/1.8/gems/ruby-fs-stack-0.4.3/lib/ruby-fs-stack/
fs_communicator.rb:81:in `get'
/usr/lib/ruby/gems/1.8/gems/ruby-fs-stack-0.4.3/lib/ruby-fs-stack/
familytree.rb:56:in `person'
...


How could I pass this command into the library?
http.read_timeout = 300

In the meantime I guess I can do fewer than 10 people at a time if
they are that old.

jimmy zimmerman

unread,
Feb 19, 2010, 7:21:20 PM2/19/10
to ruby-f...@googlegroups.com
I just pushed out a new gem 0.4.4 which adds a timeout option to the FsCommunicator. You can use it like so:

com = FsCommunicator.new :key => 'key', :timeout => 300

or

com.timeout = 300

I tested it with the ids and parameters here and I was able to successfully read the people with a higher timeout set.

--
Jimmy
--
Jimmy Zimmerman
http://jimmyzimmerman.com
Reply all
Reply to author
Forward
0 new messages