tdlib / td

Cross-platform library for building Telegram clients
https://core.telegram.org/tdlib
Boost Software License 1.0
7.11k stars 1.44k forks source link

Getting lots of error with: Error : 420 : FLOOD_WAIT_x #2761

Closed pranavkulkarni7 closed 8 months ago

pranavkulkarni7 commented 9 months ago

I am getting lots of errors with below logs while calling TdLib, log snippet: WARN [ 2][t 4][<time>][NetQueryDelayer.cpp:83][#1][!NetQueryDelayer] Delay: [Query:[id:<id>][tl:<tl>]] [timeout:3][total_timeout:3] because of [Error : 420 : FLOOD_WAIT_3] from Session:4:download#1::Connect::TCP::Socks5 [<caller_ip:port>] --> [<ip1:port1>] to DcId{4} from [ip2:port:2]

Kindly help.

levlam commented 9 months ago

You can't avoid or avoid FLOOD_WAIT errors. They are handled automatically by TDLib, or propagated to the app if wait time is too big.

pranavkulkarni7 commented 9 months ago

@levlam thanks for the response. So all the errors we are getting are FLOOD_WAIT_3, so it means the wait time is 3 seconds. Will this wait time be handled by TdLib? During the same time of these errors, I am getting errors in download files operations with error: File download has failed or was canceled , If the FLOOD_WAIT are getting handled, what could be the other cause of this?

levlam commented 9 months ago

If file can't be downloaded for a long time because of FLOOD_WAIT errors, downloading can be also aborted.