#community-help

Resolving Memory and Null Value Errors

TLDR sahubar requests advice from Jason for a memory error and Kishore Nallan for null values in object arrays. They get advice but it doesn't solve their problem.

Powered by Struct AI
Oct 24, 2023 (1 month ago)
sahubar
Photo of md5-41ca8b93efee2249950bdd80b036a9dc
sahubar
12:49 PM
Hi Jason / Kishore Nallan

Can you confirm if the exact error message is "ObjectUnprocessable: Request failed with HTTP code 422 | Server said: Rejecting write: running out of resource type: OUT_OF_MEMORY"?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
02:02 PM
You would have to upgrade the cluster’s memory by going to Cluster Configuration > Modify to fix this error.
Oct 25, 2023 (1 month ago)
sahubar
Photo of md5-41ca8b93efee2249950bdd80b036a9dc
sahubar
06:38 AM
ok, Jason, We are currently using a 0.5GB RAM staging environment. Can you recommend an appropriate memory size?
10:10
sahubar
10:10 AM
Jason / Kishore Nallan "How should I handle null values in an array of objects? I'm encountering errors related to this issue
example error:
"RequestMalformed: Request failed with HTTP code 400 | Server said: Field prices.max.endDate must be an array of string."
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
10:21 AM
Null values must be marked as optional in the schema
10:22
Kishore Nallan
10:22 AM
As for memory usage, if you are just hitting into limit sometimes, a move to the next plan will be sufficient.
sahubar
Photo of md5-41ca8b93efee2249950bdd80b036a9dc
sahubar
10:27 AM
Could you please send me the attribute tag?
example my schema params:

    {
      "facet": true,
      "index": true,
      "infix": false,
      "locale": "",
      "name": "prices.max.endDate",
      "optional": true,
      "sort": false,
      "type": "string[]"
    }
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
10:29 AM
Hmm that field is already set optional?
sahubar
Photo of md5-41ca8b93efee2249950bdd80b036a9dc
sahubar
10:30 AM
Yes, but I encounter an error when updating documents if prices.max.endDate is null at that time.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
10:31 AM
Please share a reproduceable code snippet that we can try running to replicate the issue.

Typesense

Lightning-fast, open source search engine for everyone | Knowledge Base powered by Struct.AI

Indexed 3005 threads (79% resolved)

Join Our Community