Skip to content

execution expired - Net::OpenTimeout #105

@odedharth

Description

@odedharth

Sometimes I get a timeout error for API calls such as $customerio.identify:
Backtrace:

Message: execution expired
/app/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/http.rb:947 initialize
/app/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/http.rb:947 open
/app/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/http.rb:947 block in connect
/app/vendor/ruby-2.6.6/lib/ruby/2.6.0/timeout.rb:103 timeout
/app/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/http.rb:945 connect
/app/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/http.rb:930 do_start
/app/vendor/ruby-2.6.6/lib/ruby/2.6.0/net/http.rb:919 start
/app/vendor/bundle/ruby/2.6.0/gems/customerio-2.2.1/lib/customerio/client.rb:199 request
/app/vendor/bundle/ruby/2.6.0/gems/customerio-2.2.1/lib/customerio/client.rb:138 create_or_update
/app/vendor/bundle/ruby/2.6.0/gems/customerio-2.2.1/lib/customerio/client.rb:30 identify
  1. Having the function return an error for timeout means that we should wrap up every API call in a begin statement. Is this the intended behavior? I would prefer it not to throw an error in this case.
  2. Can we control the timeout threshold? I would not like it to be more than 3 seconds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions