Back

[CLOSED] list limit

  • 1
  • Databases
  • Web
D5
14 Jun, 2023, 22:40

Are you specifying an API key in the request?

TL;DR
TL;DR: The user is discussing the need for limits and kills on slow queries to protect the platform. They suggest that limits and kills should apply to client rest/sdk requests, not queries made from functions. They also mention the need for customizable limits. The issue is resolved as of version 1.3, as the maximum limit has been removed.
D5
14 Jun, 2023, 22:42

I mean in the headers

nev-21
14 Jun, 2023, 22:42

But when trying to get a list from a function (to make business logic or integration, like sync tables) sometimes fetch all table records is needed, for example, I will have a table with almost 10K records, so I will need to fetch them in the function, but for client sdk It is good the limit of 5000 (or even less)

nev-21
14 Jun, 2023, 22:43

I tried both, with client session, and with server api key

nev-21
14 Jun, 2023, 22:43

both responses are the same

D5
14 Jun, 2023, 22:43

And in both cases without an API key you're able to get unlimited documents?

nev-21
14 Jun, 2023, 22:43

yes

D5
14 Jun, 2023, 22:44

πŸ€” @Steven Could you take a look into this? Shouldn't that be limited client sided without an API key?

nev-21
14 Jun, 2023, 22:46

So with server sdk the limit is not 5000?

nev-21
14 Jun, 2023, 22:46

I mean when using apikey

Drake
14 Jun, 2023, 22:47

as of 1.3, we've removed the maximum limit

D5
14 Jun, 2023, 22:48

Whaaat πŸ˜…

Drake
14 Jun, 2023, 22:48

but total is still capped at 5k

D5
14 Jun, 2023, 22:48

But isn't that going to allow abuse?

Drake
14 Jun, 2023, 22:48

we plan to kill and block slow queries

nev-21
14 Jun, 2023, 22:49

but, when a query is considered slow? it will be a env var to config that?

Drake
14 Jun, 2023, 22:50

maybe/probably?

D5
14 Jun, 2023, 22:51

I think instead of removing, it should be customizable, like all other abuse limits, in my case just to reduce them. Meanwhile I will make a fork, since I don't want anyone getting 5k documents with a single request πŸ˜…

nev-21
14 Jun, 2023, 22:52

sorry, did not understand you

Drake
14 Jun, 2023, 22:54

i don't know that detail

nev-21
14 Jun, 2023, 22:54

oh, ok thanks

nev-21
14 Jun, 2023, 23:04

Are you agree that when calling "list documents " from functions there should not exist a limit or kills for slow queries? cause that is made by the developer so he must have care of what is he coding. On the contrary, the "client rest/sdk" requests should have the limit/kill

Drake
15 Jun, 2023, 00:00

We want to protect the platform and prevent one project's slow query from affecting another project, so we plan to kill slow queries regardless of client-side or server-side

nev-21
15 Jun, 2023, 04:22

sounds good

D5
15 Jun, 2023, 10:15

Anyways it will not be the same doing a query with 100000000 elements than one with 30 elements, so due to that, I think there should be anyways any limits (but customizable)

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