#Trying to create a string bigger than 100000 chars

1 messages · Page 1 of 1 (latest)

velvet kite
#

Max size in MariaDB is like 107340000 something characters, and when I try to create a string with longer than 100000 it errors like this

Operation failed: AppwriteException [Error]: Invalid document structure: Attribute "data" has invalid type. Value must be a valid string and no longer than 100000 chars
 {
  code: 400,
  type: 'document_invalid_structure',
  response: {
    message: 'Invalid document structure: Attribute "data" has invalid type. Value must be a valid string and no longer than 100000 chars',
    code: 400,
    type: 'document_invalid_structure',
    version: '1.5.3'
  }
}
#

to clarify, the max size is 1073741824

leaden prism
velvet kite
#

document

#

the attribute created fine

leaden prism
velvet kite
#

1073741824

#

probably a limitation in the backend

leaden prism
velvet kite
#

right, I think

#

it's an arbitrary limitation placed somewhere on accident

#

it's an AppwriteException, and it's not from the client SDK

leaden prism
#

Can you share the JSON response of the get collection API call?

velvet kite
#

yes one sec, lol, currently processing a chunk of documents and it's almost done

#

I mean, if I go to console and hit create attribute, it lets me use 1073741824

#
{
    "attributes": [
        {
            "key": "data",
            "type": "string",
            "status": "available",
            "error": "",
            "required": true,
            "array": false,
            "size": 100000,
            "default": null
        },
        {
            "key": "processed",
            "type": "boolean",
            "status": "available",
            "error": "",
            "required": true,
            "array": false,
            "default": null
        },
        {
            "key": "test",
            "type": "string",
            "status": "available",
            "error": "",
            "required": false,
            "array": false,
            "size": 1073741824,
            "default": null
        }
    ]
}

@leaden prism

leaden prism
velvet kite
#

no the test one

#

sorry

#

I set the data back to that

#

when I figured it wasn't gonna let me

leaden prism
velvet kite
#

no

#

the console limits me to 100,000 too

leaden prism
velvet kite
#

I take it back, I was looking at data

#

console is fine

#

though

#

broken

#

lol

leaden prism
velvet kite
#

oh god it doesn't have line wrap enabled lol

#

had to repaste it for it to recognize the string, it was blank

leaden prism
#

I was able to create a string attribute with size 1073741824 and create a document with more than 100K characters

velvet kite
leaden prism
velvet kite
#

Issue is with SDK or API maybe? I couldn’t find it in my 15 minute search through the repo but

leaden prism
velvet kite
leaden prism
velvet kite
#

A document with an attribute

leaden prism
velvet kite
#

It was data and it was the max number in that error

#

The test was just in console to see if it let me

leaden prism
velvet kite
leaden prism
velvet kite
#

the data attribute had a max of a bigger number, i got that error and changed it to the size the error specified that the API sent me back just because I figured it wouldn’t work Steven

leaden prism
velvet kite
#

I get that it’s not that right now, I’m not reporting about the data attribute right now in this moment in time, it no work, period, when I was trying it before

#

The size, max length, how@much it can hold

leaden prism
velvet kite
#

Steven I deleted it and remade it man

#

I know you can’t change it, I remade it so I could change it

leaden prism
velvet kite
#

No

#

I create attribute with number I said before as max

#

I try to create document with data attribute greater than 100,000, it errors

#

API error, from PHP, not from SDK

leaden prism
# velvet kite No

Would you please look for a get collection API call and a get attribute API call and share the JSON response of those?

velvet kite
#

Yeah when I’m home I will, I’ll report back tomorrow

leaden prism
#

I'm wondering if your old attribute is cached somewhere

velvet kite
#

okay so

#

you just want me to observe the request to the get collection from anywhere? Console works? or SDK I presume?

#

lemme check

#

yeah seems like it's cached @leaden prism -- how can I clear it? Force restart the redis container?

#

I could manually clear the cache in the redis container lol

#

okay so I restarted them

#

maybe it's my connection, maybe it's because I'm promise.all-ing, but I keep getting a random error about fetch failing

#

probably my hotel connection lol

leaden prism
leaden prism
#

whichever it is, get the ID of that and search through redis for something that includes that ID