Back

Running into rate limit in the server SDK while deleting documents

  • 0
  • Databases
nightwielder
4 Jul, 2023, 05:58

Hi! I need to delete a huge amount documents from a collection. I created a cloud function to do this. But I can only delete 60 documents, it shows me a rate limit error after that. From the documentations, the rate limit for deleteDocument is said to be 60 requests per minute. How can I increase it? Thanks. PS: I'm using an API key, and the function does run on the server.

TL;DR
The user is experiencing a rate limit error while trying to delete a large number of documents using an API key. They are asking for help on how to increase the rate limit. A potential solution is suggested to disable the abuse protection variable temporarily.
nightwielder
4 Jul, 2023, 06:08

I think I found the solution! Will just disable the abuse protection variable for a bit.

D5
4 Jul, 2023, 08:36

Not a solution. Supposedly by using the API key correctly you should not see any limit. Did you have added the correct scopes in the API key?

D5
4 Jul, 2023, 08:37

Also are you sure you're setting it correctly?

nightwielder
4 Jul, 2023, 08:48

If I didn't set the correct ones, I suppose the documents would not delete at all, right?

nightwielder
4 Jul, 2023, 08:49

And, the documentations say there's a rate limit, even when I click on the nodejs server side from the dropdown.

D5
4 Jul, 2023, 08:55

If they have delete permissions, they would delete

D5
4 Jul, 2023, 08:56

Supposedly when using an API key that should bypass the limit

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more