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

[BUG]: updates stop going with high rpc #72

Open
grinrill opened this issue Feb 28, 2021 · 5 comments
Open

[BUG]: updates stop going with high rpc #72

grinrill opened this issue Feb 28, 2021 · 5 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@grinrill
Copy link
Contributor

grinrill commented Feb 28, 2021

Description

I have bot with 200-300 request per second. For example, my golang code with mtproto do nothing: just count updates.
After some time (30-60 seconds) updates stop going.

Failed snippet

My code is here: https://play.golang.org/p/1vPQ_A8MWyI
Full console output here: https://nekobin.com/muyagozifo
(log format: left digit is seconds count from start, right digit is updates count)
I run it on repl.it, if it matters

@grinrill grinrill added the bug Something isn't working label Feb 28, 2021
@quenbyako
Copy link
Member

@grinrill Thanks for reporting!

Looks pretty strange... Maybe pinger sends pings incorrectly, but i'm not sure at all... I'll figure it out, thanks for logs! it can help us

@quenbyako quenbyako added the good first issue Good for newcomers label Feb 28, 2021
@quenbyako
Copy link
Member

@grinrill Have some news: looks like telegram servers just cut updates channel even if you send a couple of requests per minute. It may be necessary to send an update request to the server once a minute. It needs to be checked, I'm not sure, because this process is not described in the documentation.

In any case, I should note that at this moment, getting and processing updates is very problematic. It may be necessary to spend time on creating the subsystem for receiving and processing mrptoto updates, This is a very important function along with secret chats.

@grinrill
Copy link
Contributor Author

grinrill commented Mar 1, 2021

Thank you!

Also now i have log with InitWarnChannel: true and utils.ReadWarningsToStdErr(Client.Warnings)
And without calling UpdatesGetState.
Maybe it will help.

Code: https://nekobin.com/qujuquhada
Log output: https://nekobin.com/linawebivo
(log is not full because repl.it have log size limit)

@sosnovski
Copy link

I had a similar problem. As it turned out, when a BadServerSalt message was received, the errorSessionConfigsChanged structure was sent to all existing channels. However, after sending, the channel was not removed from responseChannels. This led to the fact that when receiving the second BadServerSalt message, the errorSessionConfigsChanged message tried to go to channels that no one else reads and because of this, processing of subsequent messages was blocked.
It seems that this repository is abandoned, so I did not do PR.

An example of a solution can be found here

@xepozz
Copy link

xepozz commented Jul 2, 2022

Is help needed to solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants