mimic-sussex / sema

Sema – A Playground for Live Coding Music and Machine Learning
https://sema.codes
MIT License
153 stars 51 forks source link

localstorage reaching max capacity, so no more commands can be run #168

Open chriskiefer opened 4 years ago

chriskiefer commented 4 years ago

i got this error:

history.js:36 Uncaught DOMException: Failed to set the 'model-history-2020-06-19T09:11:46.982Z' property on 'Storage': Setting the value of 'model-history-2020-06-19T09:11:46.982Z' exceeded the quota. at addToHistory (http://localhost:8080/bundle.js:17442:43) at evalModelEditorExpressionBlock (http://localhost:8080/bundle.js:6858:74) at doHandleBinding (http://localhost:8080/0.0.js:7119:14) at http://localhost:8080/0.0.js:7190:61 at lookupKey (http://localhost:8080/0.0.js:6764:26) at lookupKeyForEditor (http://localhost:8080/0.0.js:7132:37) at dispatchKeyInner (http://localhost:8080/0.0.js:7160:18) at dispatchKey (http://localhost:8080/0.0.js:7156:12) at handleKeyBinding (http://localhost:8080/0.0.js:7190:14) at CodeMirror.onKeyDown (http://localhost:8080/0.0.js:7209:19)

This is an important issue for research data, so we need to fix this

chriskiefer commented 4 years ago

maybe this helps https://developer.chrome.com/apps/offline_storage#asking_more

frantic0 commented 4 years ago

what's the max quota?

frantic0 commented 4 years ago

It's variable

Sharing the pool Temporary storage is shared among all web apps running in the browser.{#It is also shared across all offline APIs, such as App Cache, IndexedDB, and File System. However, it does not include web storage APIs like Local Storage and Session Storage, which still has a limit of 5 MB per origin.#} The shared pool can be up to 1/3 of the of available disk space. Storage already used by apps is included in the calculation of the shared pool; that is to say, the calculation is based on (available storage space + storage being used by apps) .333 .*

Each app can have up to 20% of the shared pool. As an example, if the total available disk space is 60 GB, the shared pool is 20 GB, and the app can have up to 4 GB. This is calculated from 20% (up to 4 GB) of 1/3 (up to 20 GB) of the available disk space (60 GB).