Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

302
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!