IndexedDB throws QuotaExceedError even though there is 1Gb of free space is available
Reported by
fast...@gmail.com,
Nov 8 2017
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 Steps to reproduce the problem: 1. Windows 10 2. Available free space on the main drive is <= 1Gb. 3. Open attached INDEX.HTML test case in Chrome What is the expected behavior? MyDatabase database has been created in IndexedDB storage. 10 records have been added You are able to see them in Dev Tools What went wrong? QuotaExceedError occurred. Db has been created but no records have been added. Did this work before? N/A Does this work in other browsers? Yes Chrome version: 61.0.3163.100 Channel: stable OS Version: 10.0 Flash Version: Tested in MS EDGE and Firefox and is working as expected.
,
Nov 8 2017
And 300 MB is shared by all of the storage, not just your origin or just Indexed DB, as far as I know.
,
Nov 8 2017
Yes, I have seen some speculations on these numbers. The most popular, I guess, is that storage is only 6% of available free space. However, in the test case, I'm just inserting a few records that will take less than 1Mb of free space whilst there is 1Gb available. I have a dozen of users facing the issue and their available free space varies from 1G to 2Gb (and 1 unconfirmed report when there is 20Gb). In MS Edge and Firefox, it is just working as expected. So when it comes to explaining what causes the issue I'm getting lost in guesses, since there is no proper Chrome's documentation regarding this behavior.
,
Nov 10 2017
For local testing, if you go to DevTools > Application > Clear Storage you'll see the usage per type and the overall quota for your origin. These should be roughly the same numbers returned via navigator.storage.estimate() - in your app you can check that and see if the space available for these users coincides with the errors you're seeing.
,
Nov 28 2017
Usually, there are 80 B displayed in the Dev tools interface (sometimes numbers differ but they are always equal (used == quota). navigator.storage.estimate() always show usage = 0 and quota = 0 even though I have 1.5 Gb of free space. see attached screenshot
,
Nov 28 2017
Thank you for providing more feedback. Adding requester "jsbell@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Dec 5 2017
Try going to be chrome://histograms/ and searching on Quota.GlobalTemporaryPoolSize - this tells you how much space (in MB) Chrome has calculated it should allow all origins to share. FYI, the code for calculations and constants are here: https://cs.chromium.org/chromium/src/storage/browser/quota/quota_settings.cc?sq=package:chromium&dr&l=54 There are lots of heuristics, but if you're under 10% and especially under 1% free, Chrome is going to restrict its pool size to avoid bricking the device (some OSs perform poorly when disk space is exhausted)
,
Dec 5 2017
As explained in #7, we don't want to cause the free disk space to go too low, to avoid killing the OS. FWIW, I've broken my own Windows, Mac and Linux installs before (to the point where I had to boot off of a different disk and delete things) by accidentally eating up all available space, so this is a real problem. If the problem is reducing customer support, I suggest trying to display a notification that asks the users to free up more space, without going into specifics. I'm closing this bug, as we're not going to change out quota implementation to be more aggressive in low disk space situations. philipwalton@: please feel free to reopen and take over if you'd like to help with documenting our behavior here!
,
Dec 5 2017
Ok, I understand. I will add an extended logging to my app and try to catch the case when a user has about 20Gb of free space available. If I will be able to reproduce it I will re-open the issue.
,
Dec 6 2017
I'm facing the same issue and it is quite annoying because end users of my application do not consider 1.5GB of free disk space as low. I have to listen complains and show special chrome-specific notifications. In my case, this issue results in potential loss of data. In average application requires just 3MB of disk space so it is a shame to crash when there are >=1 GB of disk space available. I would be grateful if you provided at least some mechanism to resolve the issue.
,
Dec 6 2017
By the way, while investigating the issue I've found out that once disk space reaches some limit (~1.6GB) then quota instantly drops to zero (from 50+MB) and does not allow to write even 1KB of data. I think, whatever heuristics are used it is not an expected behavior. |
||||
►
Sign in to add a comment |
||||
Comment 1 by phistuck@gmail.com
, Nov 8 2017