Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

Excon error, timeout reached #8

Open
cippaciong opened this issue Jul 14, 2015 · 8 comments
Open

Excon error, timeout reached #8

cippaciong opened this issue Jul 14, 2015 · 8 comments

Comments

@cippaciong
Copy link

Hello, lately my bot crashes quite often with this error:

/home/cippaciong/telegrambot/.bundle/ruby/2.2.0/gems/excon-0.45.3/lib/excon/socket.rb:299:in `raise_timeout_error': read timeout reached (Excon::Errors::Timeout)
        from /home/cippaciong/telegrambot/.bundle/ruby/2.2.0/gems/excon-0.45.3/lib/excon/socket.rb:49:in `rescue in readline'
        from /home/cippaciong/telegrambot/.bundle/ruby/2.2.0/gems/excon-0.45.3/lib/excon/socket.rb:44:in `readline'
        from /home/cippaciong/telegrambot/.bundle/ruby/2.2.0/gems/excon-0.45.3/lib/excon/response.rb:53:in `parse'
        from /home/cippaciong/telegrambot/.bundle/ruby/2.2.0/gems/excon-0.45.3/lib/excon/middlewares/response_parser.rb:6:in `response_call'
        from /home/cippaciong/telegrambot/.bundle/ruby/2.2.0/gems/excon-0.45.3/lib/excon/connection.rb:372:in `response'
        from /home/cippaciong/telegrambot/.bundle/ruby/2.2.0/gems/excon-0.45.3/lib/excon/connection.rb:236:in `request'
        from /home/cippaciong/telegrambot/.bundle/ruby/2.2.0/gems/excon-0.45.3/lib/excon/connection.rb:297:in `post'
        from /home/cippaciong/telegrambot/.bundle/ruby/2.2.0/gems/telegram_bot-0.0.4/lib/telegram_bot/bot.rb:52:in `request'
        from /home/cippaciong/telegrambot/.bundle/ruby/2.2.0/gems/telegram_bot-0.0.4/lib/telegram_bot/bot.rb:57:in `get_last_updates'
        from /home/cippaciong/telegrambot/.bundle/ruby/2.2.0/gems/telegram_bot-0.0.4/lib/telegram_bot/bot.rb:68:in `get_last_messages'
        from /home/cippaciong/telegrambot/.bundle/ruby/2.2.0/gems/telegram_bot-0.0.4/lib/telegram_bot/bot.rb:32:in `block in get_updates'
        from /home/cippaciong/telegrambot/.bundle/ruby/2.2.0/gems/telegram_bot-0.0.4/lib/telegram_bot/bot.rb:31:in `loop'
        from /home/cippaciong/telegrambot/.bundle/ruby/2.2.0/gems/telegram_bot-0.0.4/lib/telegram_bot/bot.rb:31:in `get_updates'

@eljojo
Copy link
Owner

eljojo commented Jul 14, 2015

hi, is by any chance your timeout higher than 50?
update: sorry i mean 60

@cippaciong
Copy link
Author

I didn't set any timeout value explicitly.

@LevKhramov
Copy link

@eljojo i change :read_timeout in excon to higher, but error persists

@eljojo
Copy link
Owner

eljojo commented Jul 22, 2015

Sorry I've been pretty busy these days and haven't been able to work on the gem.
I assume the error is on the API side.

I'll take a look tonight. Probably adding a rescue for the timeout somewhere will be a simple "patch" solution, but I should probably research why the timeouts come initially.

Sorry for the delays

@cippaciong
Copy link
Author

Any news?

@eljojo
Copy link
Owner

eljojo commented Sep 14, 2015

Hi,
I am really sorry but I haven't had the chance to play with telegram's API recently.

I'll update whenever I have news.

@und3f
Copy link

und3f commented Feb 10, 2016

Hi,

my bot crushes daily with similar error:

/var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/socket.rb:299:in `raise_timeout_error'
/var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/socket.rb:49:in `rescue in readline'
/var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/socket.rb:44:in `readline'
/var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/response.rb:53:in `parse'
/var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/middlewares/response_parser.rb:6:in `response_call'
/var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/connection.rb:372:in `response'
/var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/connection.rb:236:in `request'
/var/lib/gems/1.9.1/gems/excon-0.45.4/lib/excon/connection.rb:297:in `post'
/var/lib/gems/1.9.1/gems/telegram_bot-0.0.5/lib/telegram_bot/bot.rb:52:in `request'
/var/lib/gems/1.9.1/gems/telegram_bot-0.0.5/lib/telegram_bot/bot.rb:57:in `get_last_updates'
/var/lib/gems/1.9.1/gems/telegram_bot-0.0.5/lib/telegram_bot/bot.rb:68:in `get_last_messages'
/var/lib/gems/1.9.1/gems/telegram_bot-0.0.5/lib/telegram_bot/bot.rb:28:in `get_updates'
/root/vendor-bot/lib/vendor/telegram/bot.rb:20:in `block in run'

/root/vendor-bot/lib/vendor/telegram/bot.rb:20 is:

messages = @bot.get_updates(timeout: 3, fail_silently: true)

@dschesus
Copy link

dschesus commented Mar 11, 2019

Have someone of you any comment on this?
Did you moved to any other lib/gem?

Thanks!
JJ

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

No branches or pull requests

5 participants