fluree / server

Fluree Server - Operates Fluree in consensus, fault-tolerant, redundant
12 stars 1 forks source link

Some arrangements of @id with ê character cause huge memory consumption #95

Open Nevenall opened 1 month ago

Nevenall commented 1 month ago

Really love Fluree so far! But I'm having an issue where sometimes the ê character is causing slowdowns and huge memory usage.

I'm using the latest docker image (sha256:ef9f8c8e890585b3d99b3519204f0d0d85f4f1f2c8d7f98c7b8a1c9ddc3edf5b) in a digital ocean droplet so Fluree is limited to 4GB of memory.

Everything else seems fine, but this insert will cause my container to run out of memory:

{
  "ledger": "{{db}}",
  "insert": {
    "parent": [
      {
        "@id": "parent/Fealty to the Fêa",
        "name:": "Fealty to the Fêa"
      }
    ]
  }
}

Just using e works fine:

{
  "ledger": "testing",
  "insert": {
    "parent": [
      {
        "@id": "parent/Fealty to the Fea",
        "name:": "Fealty to the Fêa"
      }
    ]
  }
}

But, it seems like there's a length threshold because this works:

{
  "ledger": "{{db}}",
  "insert": {
    "parent": [
      {
        "@id": "parent/Fêa",
        "name:": "Fêa"
      }
    ]
  }
}

However there's something positional about it too, because this also works:

{
  "ledger": "{{db}}",
  "insert": {
    "parent": [
      {
        "@id": "parent/Fêa Fealty to the",
        "name:": "Fêa Fealty to the"
      }
    ]
  }
}
Nevenall commented 1 month ago

Nevermind! works directly on the droplet so it must be something in my setup.

Nevenall commented 1 month ago

sigh, tested without the special character on my droplet. This IS an issue.

Nevenall commented 1 month ago

An @id with a curly single like this Sailor’s Oath also causes the memory issue