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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Bug Report: 429 Too Many Requests at high upload speeds #7879

Closed
2 tasks done
WuGGu opened this issue Mar 28, 2024 · 5 comments 路 Fixed by #7913
Closed
2 tasks done

馃悰 Bug Report: 429 Too Many Requests at high upload speeds #7879

WuGGu opened this issue Mar 28, 2024 · 5 comments 路 Fixed by #7913
Assignees
Labels
bug Something isn't working product / storage Fixes and upgrades for the Appwrite Storage.

Comments

@WuGGu
Copy link

WuGGu commented Mar 28, 2024

馃憻 Reproduction steps

Upload big file like 1GB. Use a Internet connection with 200Mbit Upload.

馃憤 Expected behavior

Should just upload quicker to the storage.

馃憥 Actual Behavior

Returns 429 after a view seconds because of Too Many Requests in under 60 seconds.

馃幉 Appwrite version

Version 1.5.x

馃捇 Operating system

Linux

馃П Your Environment

Hetzner Machine with Rocky Linux and Docker.

馃憖 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

@WuGGu WuGGu added the bug Something isn't working label Mar 28, 2024
@stnguyen90 stnguyen90 added the product / storage Fixes and upgrades for the Appwrite Storage. label Mar 28, 2024
@stnguyen90
Copy link
Contributor

stnguyen90 commented Mar 28, 2024

@WuGGu, thanks for creating this issue! 馃檹馃徏 Would you please share the exact full error? Request and response headers would also be helpful.

@WuGGu
Copy link
Author

WuGGu commented Mar 30, 2024

I'll be back in the office on Tuesday due to the Easter vacation and will reproduce it. 馃槉

@WuGGu
Copy link
Author

WuGGu commented Apr 2, 2024

@stnguyen90
I hope this helps =) In my company we have 1Gbit Up and Downstream.

{
    "message": "Rate limit for the current endpoint has been exceeded. Please try again after some time.",
    "code": 429,
    "type": "general_rate_limit_exceeded",
    "version": "1.5.4"
}

payload:

fileId: unique()
file: (binary)
permissions[]: read("team:65fd90808a4607e5755e")
permissions[]: write("team:65fd90808a4607e5755e/owner")

@stnguyen90
Copy link
Contributor

@WuGGu, thanks for this! Also, what are you using to create the file? If you're using one of our SDKs, would you please provide the version?

@stnguyen90
Copy link
Contributor

Ahh wait I think I found the problem. Looks like we made a fix in #7154, but there was a regression and abuse key is missing the chunkId:

->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId}')

Compared to 1.4.x:

->label('abuse-key', 'ip:{ip},method:{method},url:{url},userId:{userId},chunkId:{chunkId}')

@stnguyen90 stnguyen90 self-assigned this Apr 3, 2024
stnguyen90 added a commit that referenced this issue Apr 3, 2024
A previous PR added chunkId as an abuse key param to fix a problem where uploading multiple chunks of a file would trigger the `general_rate_limit_exceeded` error. For some reason, the parameter disappeared from the abuse key causing a regression. This PR adds the param back to fix the regression.

Reference:
* #7879
* #7154
@stnguyen90 stnguyen90 linked a pull request Apr 3, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working product / storage Fixes and upgrades for the Appwrite Storage.
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants