Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Net::OpenTimeout: execution expired #33

Closed
rolfschmidt opened this issue Sep 26, 2022 · 1 comment
Closed

Net::OpenTimeout: execution expired #33

rolfschmidt opened this issue Sep 26, 2022 · 1 comment

Comments

@rolfschmidt
Copy link

rolfschmidt commented Sep 26, 2022

<#<Net::OpenTimeout: execution expired>

/opt/zammad/vendor/ruby-3.0.4/lib/ruby/3.0.0/net/http.rb:987:in `initialize'
/opt/zammad/vendor/ruby-3.0.4/lib/ruby/3.0.0/net/http.rb:987:in `open'
/opt/zammad/vendor/ruby-3.0.4/lib/ruby/3.0.0/net/http.rb:987:in `block in connect'
/opt/zammad/vendor/ruby-3.0.4/lib/ruby/3.0.0/timeout.rb:107:in `timeout'
/opt/zammad/vendor/ruby-3.0.4/lib/ruby/3.0.0/net/http.rb:985:in `connect'
/opt/zammad/vendor/ruby-3.0.4/lib/ruby/3.0.0/net/http.rb:970:in `do_start'
/opt/zammad/vendor/ruby-3.0.4/lib/ruby/3.0.0/net/http.rb:965:in `start'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/api.rb:441:in `http'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/api.rb:303:in `block in request'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/api.rb:294:in `loop'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/api.rb:294:in `request'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/protocols/cs.rb:1446:in `get_avatar_url'
/opt/zammad/vendor/bundle/ruby/3.0.0/gems/matrix_sdk-2.8.0/lib/matrix_sdk/user.rb:60:in `avatar_url'

If your bot is requesting a lot you will easily get into this error. It can be solved by increasing the rate limit:

https://matrix-org.github.io/synapse/latest/admin_api/user_admin_api.html#override-ratelimiting-for-users

Alternatively this is also possible via SQL:

matrix-org/synapse#6286 (comment)

EDIT 1

I still have the issue. The changes did not work. I asked in the synapse chat and they adviced me to search in the reverse proxies. I will keep this post up to date when I find new ideas to solve the issue.

image

@ananace
Copy link
Owner

ananace commented Oct 12, 2022

It should be noted that the Ruby SDK chooses not to try to intelligently handle any low-level communication issues, it will only handle expected application-level errors that can occur - things like the Matrix server responding with a 429 Too Many Requests.

If you're seeing errors with the socket not opening within the timeout, you can either expand said value

api.open_timeout = 120

or use Ruby's exception handling to retry the action that failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants