title: Chrome on Android: Granted Quota for IndexedDB suddenly almost 0
body: <p>Was there recently a change in Android Chrome's quota management for IndexedDB? I'm using PouchDB with adapter IndexedDB in an Ionic 3 Cordova app. It went pretty smooth for the last 6 months. But within the last 5 days, I received a significant increase in complaints about data not loading correctly in the app. My app requires only 3-4 MB of data. Here's what I know so far:</p>
  
  <ul>
  <li>Problem only occurs in situations with low disk space on the <strong>internal storage</strong> (even if the app is installed on an SD card)</li>
  <li>Affected devices almost always have only 16GB of internal disk space and seem to be constantly full</li>
  <li>Freeing disk space resolves the problem</li>
  <li>There seems to be a sharp cut-off for the <strong>granted quota</strong> for IndexedDB when the device runs below 150-250MB or so. If an additional 100-200MB are freed, the granted quota suddenly jumps up to 50MB or more</li>
  <li>It seems that there was a recent change to either Chrome or Android that introduced this problem, because my app didn't receive an update recently and it even affects new users with only a few KB of data.</li>
  </ul>
  
  <p>I also suspected that maybe people took more photos in the last days, because the weather was pretty good, resulting in less free disk space and thus, a spike in reported errors. But I'd still find this an odd explanation.</p>
  
  <p>Anyone else noticed similar problems in their apps? Any solutions besides switching to Cordova-SQLite?</p>
  
  <p>Update 2018-05-03:</p>
  
  <p>I figured a few more things:</p>
  
  <ul>
  <li>Devices almost always require more an 1 GB of free internal storage. 500MB isn't enough anymore</li>
  <li>If you plan to move to SQLite with PouchDB, read the comments of this question. There might be problems with attachments.</li>
  <li>If you're using Ionic Storage (based on LocalForage), it will automatically switch to SQLite after you installed the plugin. In my case, this resulted in database errors and I had to switch <code>drivers</code> for Ionic's Storage: <code>driverOrder: ['localstorage', 'indexeddb', 'sqlite', 'websql']</code></li>
  </ul>