amark / gun

An open source cybersecurity protocol for syncing decentralized graph data.
https://gun.eco/docs
Other
18.12k stars 1.16k forks source link

DOMException: Failed to execute 'setItem' on 'Storage': Setting the value of 'gap/gun/' exceeded the quota. #1016

Open Jack-Works opened 4 years ago

Jack-Works commented 4 years ago

Maybe gun set too many data in the storage?

Tedko commented 4 years ago

@amark gun is magic!

amark commented 4 years ago

@Jack-Works yeah localStorage has 5MB limit, you'll need to try using IndexedDB via https://gun.eco/docs/RAD#install tho I recommend talking to @mmalmi or @sirpy who use IndexedDB in-production with real users, as they might have some edge cases & options they can warn about or recommend.

Note! New GUN (with high performance) that I've been tweeting about is not on master or NPM published yet. If you can link me to your /stats.html pages we can monitor performance & see if we need to try to upgrade you early (tho sirpy has already run into some issues) before the unit tests are all passing, depending on what is needed urgently or not.

Jack-Works commented 4 years ago

Oh I didn't ever learned that gun can use indexed db, I though RAD is for Nodejs.

Does gun able to migrate data in the data in the local storage to indexed db?

And what if it stored too many data in the indexed db?

amark commented 4 years ago

@Jack-Works unfortunately not. That is a good/important feature for the future, but pretty low priority for me (trying to keep these 40K users/second in-production peers afloat!)

IndexedDB may ask browser user fro more storage (depending on which browser), after that is used up, you'll get errors.

Jack-Works commented 4 years ago

Yeah, does gun able to recover from those errors? For example, use LRU to clean data