-
-
Notifications
You must be signed in to change notification settings - Fork 277
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
FloodWaitError #542
Comments
Messages from bots have a very low priority on the server side of Telegram (i.e. Telegram DCs). When a Telegram DC is under high server loads ("service degradation"), bot messages are dropped severely. As a result, the DC asks bots not to send more messages by returning We can do nothing but wait for the DC to recover from the service degradation.
|
Thank you for detailed response! Is it possible to solve this problem by recreating a bot of other DC(seems like assigned randomly)? This problem has existed for at least half year, I don't think it will be solved recently lol |
AFAIK, a bot is created at the same DC as its creator, i.e., if your Telegram account belongs to DC5, all your bots will belong to DC5 too.
It has existed for several years. Generally, a service degradation will be resolved within a day, and @RSStT_Bot works all fine now. |
But my bot won't respond to any command forever once the error occurred. What do I need to do to make sure it will be recovered? |
Once the service degradation comes to an end, restart the bot. |
Could you tell me the detailed steps to restart the bot? Do you mean restarting the docker container? Or restarting the telegram bot by some command within Telegram client? |
restart RSStT, i.e., restart the docker container if it is deployed via docker. |
能否参考此项目:https://github.com/iovxw/rssbot |
This comment was marked as off-topic.
This comment was marked as off-topic.
@nageshuizeii
我所知的所有先验知识都指出,一个从一开始就大得不合理的 flood wait time,只可能由 DC 服务降级引发,而不会由常规的 rate limit 引发。常规的 rate limit 所要求的 flood wait time 一开始很小,然后会逐步增长,但也不会增长到 DC 服务降级的时候的那种数量级,基本上不会大于四位数。实际上,在最严重的服务降级中,属于 DC5 的所有用户(不只是 bot)都会在进行任何操作时被要求一个大得不合理的 flood wait time(五位数或以上)。 目前所有的这类 issue 都有一个共同特征:bot 属于 DC5。本项目的公共 demo 也属于 DC5,且其上托管了非常多的订阅,发送消息的频次应该会比你的私有实例更频繁,然而公共 demo 却从未持续地遭遇过这样的问题,仅在 DC5 服务降级期间会一过性地以同样的症状被阻断几个小时。因此,我倾向于认为这个问题是罕有个例。更重要的是,因为我无法复现你所说的长时间内一直被要求不合理的 flood wait 延迟的情况,我也无法真正探寻其根本原因。 仅为毫无依据的猜测,为了搞清楚造成你的 RSStT 实例、公共实例、你的 iovxw/rssbot 实例三者之间的现象差异的原因,我有以下猜测或建议:
|
3.尝试了,同样报错FloodWaitError,WARNING:RSStT.locks - Blocking any further messages for 【TGID】 due to flood control, 2379.00s left |
绝大部分用作代理出口的 IP 都是容易辨识的(查询 ASN 可以知道 IP 归属于云服务商,且会有大量的用户同时使用该 IP 登录)。这很可能导致 IP 被 shadow ban。变更节点不改变这一事实。因此我认为很可能就是此原因。
这更加加重了 IP shadow ban 的嫌疑。 如果信任的话,你可以私底下将一个确定会引发该问题的 bot token 发给我(不要发在这里!),我看看能不能复现该问题。 还有一种可能性。RSStT 内置了数个网络上公开可知的 Telegram 客户端指纹,并在默认情况下随机选择一个用于 bot 的登录。由于对于 bot 来说,客户端指纹是不重要的,因此这并没有引起什么问题。但是,不清楚这是否也和我猜测的 IP shadow ban 相关。如果你兴趣的话,可以申请一个自己的客户端指纹并使用之。 |
已邮件反馈token,感谢!我再看一下指纹 |
测试了你的 token,可以正常使用,无法复现该问题。因此,可能确实为 IP 的问题。 在 Railway.app 上测试了,也没有问题,你可以自行测试。 |
这个问题我已经回答过了: 实际上 iovxw/rssbot 与 RSStT 唯一值得留意的不同只有: 实际上,由于 HTTP Bot API 是开源的,可以知道,它本身就是个合法的 MTProto 客户端。尽管不清楚 Telegram 官方的 HTTP Bot API 是否有未知的独特的改动,但是可以合理猜测,在 MTProto API 层面,Telegram 服务器看到的是 HTTP Bot API 的托管服务器的 IP,而不是你的 IP。如果这个假设是真的,那么就可以绕过我所猜测的 IP shadow ban。
没有任何先验知识表明存在这样的关联性。况且,你先前在另一个 issue 中提供的 log 表明,纯文本消息也会被 FloodWaitError 阻断。 |
Describe the bug
Tip
A clear and concise description of what the bug is.
only the first command will be executed after restarting.
To Reproduce
Tip
Steps to reproduce the behavior.
docker compose up -d
Screenshots
Tip
If applicable, upload screenshots to help explain your problem.
Feed URL
Tip
If applicable, provide the feed URL that causes the bug.
Expected behavior
Tip
A clear and concise description of what you expected to happen.
Important log
Important
Rerun RSStT with
DEBUG=1
set in the environment variables, and paste the log below.If you are using Docker, you can get the log by executing:
The text was updated successfully, but these errors were encountered: