twitter / twurl

OAuth-enabled curl for the Twitter API
https://developer.twitter.com
MIT License
1.8k stars 301 forks source link

How to handle timeout issue #36

Closed sp88011 closed 7 years ago

sp88011 commented 11 years ago

I'm using twurl via the Mac Terminal and everything works fine except that I get timeout errors (for certain keywords) when accessing the search API. Is there anyway to rescue these timeout errors or set the timeout-treshold higher?

twurl -t -d track='very_rare_keyword' -H stream.twitter.com /1.1/statuses/filter.json >filename.json

yields (after roughly have a minute)

/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:inrbuf_fill' from /usr/lib/ruby/1.8/net/protocol.rb:104:in read_all' from /usr/lib/ruby/1.8/net/http.rb:2228:inread_body_0' from /usr/lib/ruby/1.8/net/http.rb:2181:in read_body' from /usr/lib/ruby/gems/1.8/gems/twurl-0.8.3/bin/../lib/twurl/request_controller.rb:14:inperform_request' from /usr/lib/ruby/1.8/net/http.rb:1054:in request' from /usr/lib/ruby/1.8/net/http.rb:2144:inreading_body' from /usr/lib/ruby/1.8/net/http.rb:1053:in request' from /usr/lib/ruby/1.8/net/http.rb:1037:inrequest' from /usr/lib/ruby/1.8/net/http.rb:543:in start' from /usr/lib/ruby/1.8/net/http.rb:1035:inrequest' from /usr/lib/ruby/gems/1.8/gems/twurl-0.8.3/bin/../lib/twurl/oauth_client.rb:80:in perform_request_from_options' from /usr/lib/ruby/gems/1.8/gems/twurl-0.8.3/bin/../lib/twurl/request_controller.rb:13:inperform_request' from /usr/lib/ruby/gems/1.8/gems/twurl-0.8.3/bin/../lib/twurl/request_controller.rb:9:in dispatch' from /usr/lib/ruby/gems/1.8/gems/twurl-0.8.3/bin/../lib/twurl/abstract_command_controller.rb:7:indispatch' from /usr/lib/ruby/gems/1.8/gems/twurl-0.8.3/bin/../lib/twurl/cli.rb:38:in dispatch' from /usr/lib/ruby/gems/1.8/gems/twurl-0.8.3/bin/../lib/twurl/cli.rb:21:inrun' from /usr/lib/ruby/gems/1.8/gems/twurl-0.8.3/bin/twurl:4 from /usr/bin/twurl:19:in `load' from /usr/bin/twurl:19

andypiper commented 7 years ago

Closing for age / inability to repro - please open a new issue if this still occurs with 0.9.3