This message was deleted.
# community-help
s
This message was deleted.
j
Yeah, you would have to upgrade your RAM, under Cluster Configuration > Modify
e
hmmm
i really don’t have much there actually
these are my file on disk
and I use this function to upsert/delete docs
Copy code
def upload_and_delete_typesense():
    client = create_client()
    # new_collection_name = "amso_zh"
    for lang in fe_languages:
        new_collection_name = f"tke_{lang}"
        upsert_docs, ids = import_and_upsert_documents(
            client, f"algolia_jobs-{lang}.json", new_collection_name
        )
        deleted = delete_document(client, new_collection_name, ids)
        pprint(deleted)
is there a way to see what’s consuming this much memory, I am running on 0.5GB but with my files (the way I read this) I should have at least 2-3 times of my of the amount the collections take on the disk
here’s my upsert function aswell
Copy code
def import_and_upsert_documents(client, json_file, collection_name):
    # Open and read the JSON data from the file
    with open(json_file) as f:
        json_data = json.load(f)

    # get all 'id' fields
    ids = [
        doc["data"]["idClient"] for doc in json_data
    ]  # we are doing this here since we already opened the file

    # Convert list of JSON objects to JSONL format
    jsonl_data = "\n".join(json.dumps(doc) for doc in json_data)

    # Import documents into the collection
    upsert = client.collections[collection_name].documents.import_(
        jsonl_data.encode("utf-8"), {"action": "upsert"}
    )
    return upsert, ids
j
We don't store per index memory consumption metrics... I see a momentary spike in memory, so it's likely that the data being indexed didn't fit in the remaining amount of RAM.
e
yeah I was importing the jobs when I got that error, but my total data at typesense could be no more than 50MB, so I’m wondering why I got this error
j
The OS usually takes up about 250MB of RAM by itself… and a 50MB file could take as much as 150MB of RAM.
e
ah ok i didn’t account for the OS
I upgraded to 2GB