Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

303
Visualizações
Using "getAll()" on an IndexedDB keeps throwing errors. Is there a limit to the amount of data that can be returned?

PROBLEM: I know there is a limit to the number of records (2^32 - 1 per Mozilla) that can be returned from IndexedDB, but what about data? I am having a problem with IDBIndex.getAll(), or IDBObjectStore.getAll() for that matter, throwing a generic error whenever the amount of data apparently exceeds a certain size.

 "DOMException: The operation failed for reasons unrelated to the database itself and not covered by any other error code."

I am using Firefox, and this has been an issue for a while.

EXAMPLE:

... open the database, etc ...
let index = db.transaction("database").objectStore("myStore").index("myIndex");
let range = IDBKeyRange.lowerBound(100000);  // That's just a random number for the example
let results = index.getAll(range);
results.onerror = e => {...};
results.onsuccess = e => {...};

That will always throw an error. But if I change the range to IDBKeyRange.lowerBound(100001), it always works.

TESTS: If I were to turn lowerBound into upperBound (and change the range), the number of records returned without throwing an error would change, but that number would be consistent. Since not all records have the same amount of data, and the number of records returned in each case is fairly close (19,844 vs 20,188), that seems to support my assertion. The same thing happens if I change the index, just a different number of records.

Edit: I tested the database on another machine and I got a different maximum number of records returned, but that number was consistent as well.

I've also tried closing programs, thinking maybe it's a memory issue, and changing the size of my database by adding or removing a significant number of records, but that has had no effect on the results returned.

As a workaround, I am currently using openCursor() to evaluate each record individually, but that is slower than using getAll() since I want all the data from each record that satisfies the query.

Any ideas what's wrong and how to fix it?

See related problem that was never solved

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda