Back

[SOLVED] Failed to generate collection. ...http 400...attribute_limit_exceeded

  • 0
  • Functions
  • Cloud
Matej
28 Sep, 2023, 22:48

Failed to generate Short URL collection. {"code":400,"type":"attribute_limit_exceeded","response":{"message":"Attribute limit exceeded","code":400,"type":"attribute_limit_exceeded","version":"0.11.4"}}

I am generating exactly 8 attributes for one collection, one by one, and it fails on about 5. Is this yet another internal limit where I can't do small batch of 8 attribute creation?

TL;DR
Issue: User is experiencing a "Failed to generate collection" error with the error code "http 400 attribute_limit_exceeded." They are generating 8 attributes for one collection, but it fails on about 5. Solution: The error is occurring because the user has reached the attribute limit. The user had a string attribute with a length of 9999, which was taking up a lot of space. They need to be mindful of the size of each attribute since URLs take up a significant amount of space. They should reconfigure their attributes to reduce the overall size of the collection. It is not recommended to create a batch of
Drake
28 Sep, 2023, 22:53

url attributes take up a lot of space

Matej
28 Sep, 2023, 22:54

hmm

Matej
28 Sep, 2023, 22:54

I'll try toreconfigure

Drake
28 Sep, 2023, 22:56

so the underlying database has a maximum size of 65kb. here's how much each attribute takes up:

TypeScript
+----------------+-----------------------------------------+
| Attribute Type |                  Bytes                  |
+----------------+-----------------------------------------+
| String         | 4 * length                              |
| Integer        | 8 for max values > 2,147,483,647 else 4 |
| Float          | 4                                       |
| Boolean        | 1                                       |
| URL            | 4 * 2000                                |
| Email          | 4 * 254                                 |
| IP             | 4 * 39                                  |
| Enum           | 4 * length of longest enum value        |
+----------------+-----------------------------------------+
Drake
28 Sep, 2023, 22:56

as you can see URLs take up a lot of space

Matej
28 Sep, 2023, 22:56

I actually don't make URL

Matej
28 Sep, 2023, 22:56

but a string

Matej
28 Sep, 2023, 22:56

Still, I might had too large length on it

Drake
28 Sep, 2023, 22:57

possibly...what are the attributes?

Matej
28 Sep, 2023, 22:57
Matej
28 Sep, 2023, 22:57

I had 9999 on string ones xD

Matej
28 Sep, 2023, 22:58

Ok yeah that was the issue. Thanks for the clarification on it. It's resolved πŸ‘

Matej
28 Sep, 2023, 22:58

[SOLVED] Failed to generate collection. ...http 400...attribute_limit_exceeded

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