I'm trying to delete documents in bulk, but it's limited to 25 documents, why? In the documentation it says that the request is up to 60 deletions per minute.
I can do mass document creation and update normally, but not deletion.
Rate limiting
Why?
Preventing anyone abusing your app
In docs:
Rate Limits This endpoint is limited to 60 requests in every 1 minutes per IP address, method and user account. We use rate limits to avoid service abuse by users and as a security practice. Learn more about rate limiting.
I found the solution. And reading the source code, I saw that there is a limit to list the documents, I could change the source code or make a Query.limit().
@D5 Thank you for your patience.
[Solved] Delete document are limited to 25 docs?
@Binho.dev π I don't recommend such approach, that's basically disabling/extending rate limiting
I think the best solution is making a function to delete the documents
@D5 So, I created a function for this, in fact I had already created it, but I was limiting up to 25 documents, but with Query.limit() I solved the problem.
You need to setup API key in the function. With that, you should not have any problem. Don't confuse coding functions client-sided with appwrite functions
I created a API Rest, it connects with Appwrite, but I needed a route that could make the mass deletion of documents at special times, Iβm doing this on the server side.
@D5 Working fine!
[1] RequisiΓ§Γ£o recebida: [POST] β’ /roads-delete-database β’ 30/5/2023-10:38:36
[1] Documento deletado/removido com sucesso. 0
[1] Documento deletado/removido com sucesso. 1
[1] Documento deletado/removido com sucesso. 2
[1] Documento deletado/removido com sucesso. 3
...
[1] Documento deletado/removido com sucesso. 56
[1] Documento deletado/removido com sucesso. 57
So you made it gradually?
Mass deletion does not always occur, but once a month. Now the way Iβm deleting yes, itβs deleting one file at a time. I list the amount of files in a collection and then consequently they are deleted.
Recommended threads
- 404 page not found
Hey I am trying to run a simple Svelte-kit project on appwrite self-hosted but the logs says: ```bash [13:56:26] [open-runtimes] Build packaging finished. [13:...
- Go functions cold start timeout on self-...
Hey everyone β running into a persistent cold start issue with Go functions on self-hosted Appwrite 1.9.0 (Elestio/Hetzner). Looking for how others are handling...
- Increase student pack database read and ...
Hi guys, Thank you Appwrite for an awesome platform, i am using the database function for my financial analyst app for my college final thesis. Problem: Curre...