Skip to content
Back

Error: Query on attribute has greater than 100 values: $id

  • 0
  • Self Hosted
  • Databases
Irvine
16 Mar, 2024, 17:01

Hi everyone, I would like to query data from a collection with a list of $id, but getting this error saying that the list of $id can only be 100. Is this a hard limit or soft limit? How can I solve this? or does this mean I can only divide the list of $id with 100 and does the query from collection for multiple times?

TL;DR
Developers getting "Query on attribute has greater than 100 values: $id" error even after updating `APP_LIMIT_ARRAY_PARAMS_SIZE` in `init.php`. The solution involves replacing `init.php` with volume attach. The correct path is `/usr/src/code/src/app/init.php`. The error is related to the params size constant found in the GitHub link provided. This issue can be resolved by dividing the $id list into batches of 100 and querying the collection multiple times.
Irvine
16 Mar, 2024, 17:26

Thanks for the reply, does this mean I will need to replace the init.php with volume attach?

Is this the correct path (/usr/src/code/src/app/init.php) to replace the init.php file?

Steven
16 Mar, 2024, 17:33

Up to you. It's your instance 😜

Irvine
16 Mar, 2024, 17:43

[SOLVED] Error: Query on attribute has greater than 100 values: $id

Irvine
17 Mar, 2024, 03:55

Error: Query on attribute has greater than 100 values: $id

Irvine
17 Mar, 2024, 03:57

I have tried to update APP_LIMIT_ARRAY_PARAMS_SIZE in init.php, but it still shows the same error to me.

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