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

Lots of code: 400, Too Many Requests: retry after 15 #3003

Closed
pfeux opened this issue Jul 29, 2024 · 5 comments
Closed

Lots of code: 400, Too Many Requests: retry after 15 #3003

pfeux opened this issue Jul 29, 2024 · 5 comments

Comments

@pfeux
Copy link

pfeux commented Jul 29, 2024

Hi

I have a dotnet application that calls a very similar python code (I can share my python code) located at example/python/tdjson_example.py to upload the all the files located in my local folder to my telegram group. But it has started throwing errors (it sometimes throws 15 and 14):

   error = error {.
     code = 400.
     message = "Too Many Requests: retry after 15",
}.

I have a wait time between 15-20 seconds between each file but it still keeps popping that error. I am not quite sure why? Can you please throw some light on it?

I have the latest master build version and running on Windows 11 platform

Many thanks,

@levlam
Copy link
Contributor

levlam commented Jul 29, 2024

The error can be returned only if you exceeded rate limits. There is no way to avoid it.

@pfeux
Copy link
Author

pfeux commented Jul 30, 2024

But even after pausing for 15-20seconds between each file?

Secondly, the error appears in the middle of uploading the file. What I meant is when I call sendMessage command, it runs for a while (like if I take an example of 50MB PDF file, it stops after 15% - 20% upload is done) and then suddenly starts getting FLOOD_PREMIUM_WAIT_XX.. For example

[ 3][t 3][1722250754.534937381][NetQuery.cpp:144][#1][!Session:5:upload#4][&net_query] Receive error [Query:[id:XXXX][tl:0xXXXX][msg_id:XXXX]] [Error : 420 : FLOOD_PREMIUM_WAIT_15]

@levlam
Copy link
Contributor

levlam commented Jul 30, 2024

Rate limits are up to the server. You can't avoid them.

@pfeux
Copy link
Author

pfeux commented Jul 31, 2024

Thanks @levlam

If you can let me know what are the limitations for sending files using tdlib that would really be helpful.

@levlam
Copy link
Contributor

levlam commented Jul 31, 2024

I can't, because they are out of TDLib's control.

@pfeux pfeux closed this as completed Aug 1, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants