#community-help

Typesense Cloud Cluster Out of Memory Issue

TLDR Herman experienced an OUT_OF_MEMORY error after updating their Typesense schema. Jason suggested upgrading to 1GB RAM to accommodate the indexed data.

Powered by Struct AI

1

18
4mo
Solved
Join the chat
May 26, 2023 (4 months ago)
Herman
Photo of md5-e53e7941699c56dbd1ae40a3c06d5ea6
Herman
06:16 PM
Hi!

I am having some problems with a typesense cloud cluster
I am getting "Rejecting write: running out of resource type: OUT_OF_MEMORY" after making a small change on all the documents

Does any one have any experience with this issue?
Can the cluster be restarted from the typensense cloud UI?
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:18 PM
We don’t have the option to restart from the cloud UI.

But that said, since Typesense is an in-memory datastore, memory is directly correlated to the size of the dataset you’ve indexed. So even if you were to restart, you’ll run into the same memory issue if there isn’t enough memory to hold the dataset in RAM
06:19
Jason
06:19 PM
If you can DM me your cluster ID I can take a closer look

1

06:23
Jason
06:23 PM
Looks like memory usage is just above the threshold, when you include swap usage as well.
06:23
Jason
06:23 PM
You mentioned (in DM) that you changed the schema for the collection - may I know what specific change you did?
Herman
Photo of md5-e53e7941699c56dbd1ae40a3c06d5ea6
Herman
06:25 PM
yes, we changed a nested property from flat to nested, when updating the firebase extension

the property only includes width and height, numbers
06:25
Herman
06:25 PM
not indexed
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:28 PM
I do see a marked increased in memory about an hour ago
Image 1 for I do see a marked increased in memory about an hour ago
06:28
Jason
06:28 PM
So the change might have indexed new fields in the existing records potentially that were previously not indexed
06:29
Jason
06:29 PM
Upgrading to 1GB RAM would be solution to accommodate the data that’s currently indexed
06:30
Jason
06:30 PM
Here’s a zoomed out view
Image 1 for Here’s a zoomed out view
Herman
Photo of md5-e53e7941699c56dbd1ae40a3c06d5ea6
Herman
06:33 PM
by not indexed i mean that the field is not present on the "fields"
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:34 PM
Those unindexed fields don’t affect memory usage
06:34
Jason
06:34 PM
You mentioned you changed the collection schema though?
Herman
Photo of md5-e53e7941699c56dbd1ae40a3c06d5ea6
Herman
06:35 PM
yes i was not precise, i changed the document structure on not indexed fields
Jason
Photo of md5-8813087cccc512313602b6d9f9ece19f
Jason
06:37 PM
I see… were there any other changes / traffic pattern changes in the last 5-6 hours? Seems like that’s when memory usage started fluctuating
Herman
Photo of md5-e53e7941699c56dbd1ae40a3c06d5ea6
Herman
06:44 PM
i couple of hours ago i ran the same migration on all the documents in another collection
06:44
Herman
06:44 PM
it is a dev/test server, so there is not a lot of traffic