Closed lsat12357 closed 2 years ago
another traceback
2021-12-28T23:01:23.560Z pid=40 tid=mnx8 WARN: Faraday::TimeoutError: Net::ReadTimeout with #<TCPSocket:(closed)>
2021-12-28T23:01:23.560Z pid=40 tid=mnx8 WARN: /usr/local/lib/ruby/2.7.0/net/protocol.rb:217:in rbuf_fill' /usr/local/lib/ruby/2.7.0/net/protocol.rb:191:in
readuntil'
/usr/local/lib/ruby/2.7.0/net/protocol.rb:201:in readline' /usr/local/lib/ruby/2.7.0/net/http/response.rb:42:in
read_status_line'
/usr/local/lib/ruby/2.7.0/net/http/response.rb:31:in read_new' /usr/local/lib/ruby/2.7.0/net/http.rb:1528:in
block in transport_request'
/usr/local/lib/ruby/2.7.0/net/http.rb:1519:in catch' /usr/local/lib/ruby/2.7.0/net/http.rb:1519:in
transport_request'
/usr/local/lib/ruby/2.7.0/net/http.rb:1492:in request' /usr/local/lib/ruby/2.7.0/net/http.rb:1485:in
block in request'
/usr/local/lib/ruby/2.7.0/net/http.rb:933:in start' /usr/local/lib/ruby/2.7.0/net/http.rb:1483:in
request'
/usr/local/lib/ruby/2.7.0/net/http.rb:1241:in get' /usr/local/bundle/gems/faraday-0.17.4/lib/faraday/adapter/net_http.rb:86:in
perform_request'
/usr/local/bundle/gems/faraday-0.17.4/lib/faraday/adapter/net_http.rb:44:in block in call' /usr/local/bundle/gems/faraday-0.17.4/lib/faraday/adapter/net_http.rb:93:in
with_net_http_connection'
/usr/local/bundle/gems/faraday-0.17.4/lib/faraday/adapter/net_http.rb:39:in call' /usr/local/bundle/gems/honeycomb-beeline-2.4.0/lib/honeycomb/integrations/faraday.rb:29:in
block in call'
/usr/local/bundle/gems/honeycomb-beeline-2.4.0/lib/honeycomb/client.rb:70:in start_span' /usr/local/bundle/gems/honeycomb-beeline-2.4.0/lib/honeycomb/integrations/faraday.rb:16:in
call'
/usr/local/bundle/gems/faraday-0.17.4/lib/faraday/request/url_encoded.rb:15:in call' /usr/local/bundle/gems/faraday-0.17.4/lib/faraday/rack_builder.rb:143:in
build_response'
/usr/local/bundle/gems/faraday-0.17.4/lib/faraday/connection.rb:387:in run_request' /usr/local/bundle/gems/faraday-0.17.4/lib/faraday/connection.rb:138:in
get'
/usr/local/bundle/gems/faraday-0.17.4/lib/faraday.rb:102:in method_missing' /data/app/services/oregon_digital/json_parse_service.rb:11:in
query_json'
/data/app/services/oregon_digital/json_parse_service.rb:7:in json' /data/lib/oregon_digital/controlled_vocabularies/vocabularies/itis.rb:21:in
fetch'
UGH namespace error
QA on #2153 should cover this too. Errors are being handled for timeouts, we'll also add code to handle empty responses when the service is up but the URI is bad.
Descriptive summary
When fetching label for itis uri fails, it does not do so gracefully; in the example below, the hyrax actor stack stopped.
Expected behavior
traceback: I, [2021-12-30T09:18:46.496810 #1360] INFO -- : Fetching https://www.itis.gov/servlet/SingleRpt/SingleRpt?search_topic=TSN&search_value=99208 from the authorative source. (this is slow) E, [2021-12-30T09:18:46.582521 #1360] ERROR -- : end of file reached Traceback (most recent call last): 16: from (irb):119:in
process_pids' 15: from (irb):119:in
each' 14: from (irb):124:inblock in process_pids' 13: from (irb):57:in
fix_visibility' 12: from app/actors/oregon_digital/actors/create_with_oembed_url_actor.rb:19:inupdate' 11: from app/indexers/image_indexer.rb:6:in
generate_solr_document' 10: from app/indexers/generic_indexer.rb:15:ingenerate_solr_document' 9: from app/indexers/concerns/oregon_digital/indexing_dates_behavior.rb:9:in
generate_solr_document' 8: from app/indexers/oregon_digital/deep_indexing_service.rb:19:infetch_external' 7: from app/indexers/oregon_digital/deep_indexing_service.rb:19:in
each' 6: from app/indexers/oregon_digital/deep_indexing_service.rb:20:inblock in fetch_external' 5: from app/indexers/oregon_digital/deep_indexing_service.rb:27:in
block (2 levels) in fetch_external' 4: from lib/oregon_digital/controlled_vocabularies/scientific.rb:22:infetch' 3: from lib/oregon_digital/controlled_vocabularies/vocabularies/itis.rb:21:in
fetch' 2: from app/services/oregon_digital/json_parse_service.rb:7:injson' 1: from app/services/oregon_digital/json_parse_service.rb:11:in
query_json' Faraday::ConnectionFailed (end of file reached)