Too Many Requests: retry after 245
Closed this issue · 3 comments
Sometime after just adding a new torrent i'll do a /he
to show the progress, but the bot will not reply me, he will just start typing but nothing will popup, looking at the log i'll see
[ERROR] Send: Too Many Requests: retry after 245
probably too much edit-request made by the previous (started days ago) /he
request ?
I faced the same problem yesterday, maybe Telegram has lowered their limit lately.
probably too much edit-request made by the previous (started days ago) /herequest ?
Can't be, the updates are kept alive for 2 minutes, we edit 60 times with 2 seconds interval, that's excessive to be honest, we should lower that to something like 10 edits with 5 seconds interval would be reasonable. Also maybe we should start supporting webhooks
which I believe has a better limit than long polling.
probably another thing can help: if i write 3x /he
he will send me 3 message and keep updating these 3 causing 3x request each 2sec ... the old one should at least stop to be updated
probably another thing can help: if i write 3x /he he will send me 3 message and keep updating these 3 causing 3x request each 2sec ... the old one should at least stop to be updated
Keeping track of how many /he
are called and only keep updating the last one would get complicated, Not calling more than one /he
or any other live command is advised, Also, If you have many torrents, avoid commands such as /list
because it'll send multiple messages at once.
I made a couple of changes to help solve this problem
- Reduced the
duration
to10
and increased theinterval
to5
, so that's10
updates with5
seconds in-between. - Introduced a new flag
-no-live
, If set, No messages will get updated.
Give it a whirl.