vrtmrz / obsidian-livesync

MIT License
4.71k stars 151 forks source link

QuotaExceededError in ios #254

Open DesmondSylin opened 1 year ago

DesmondSylin commented 1 year ago

Abstract

The synchronisation hung up immediately after connecting.

Expected behaviour

Actually happened

Error
vrtmrz commented 1 year ago

Thank you for the report! The storage quota has depended on the iOS version and the actual free space of the device. Prior to iOS 16, the quota starts at 1 GB and fails at over a few per cent of the actual free space size. The quota of iOS 17 does not have a minimum size (I have not seen the actual behaviour yet).

May I ask about your environment and free space?

(And if you do not mind, I would love to know the way to inspect mobile obsidian from Safari).

If your device has been used with the LiveSync for a while, fetching again possibly be a workaround. However, It may lose the root resolution for this issue.

DesmondSylin commented 1 year ago

I use iPad mini 6 and iPadOS 16.6 ( Maybe have to upgrade to 17?) My storage is 64GB and now still has 34GB free space. (By the way, my couchdb database occupies a capacity of 1.3gb and Indexeddb on ipad about 730mb)

About inspecting, I follow the steps from this page to inspect Obsidian. In debug mode, Safari can see app://obsidian when the app is opening on ipad.

I really appreciate your help〜

vrtmrz commented 1 year ago

Thank you for your information! Looks like everything is OK. (And we can keep iOS 16). I am really wondering what this issue has been caused, however, this is a critical problem.

Let me sort this out for cases.

If the reason is actually caused by IndexedDB: If simply there are too many unused chunks or older revisions, and the storage has been pressured, it could be resolved by Rebuild everything or Perform cleaning on the Maintain databases pane on the setting dialogue. We also can check the amount of currently unreferenced chunks by the DryRun button.

There are more non-simple cases(i.e., run out in total), The area where the local database is located is shared by all vaults on Obsidian. This includes that deleted vaults. If we have several such disused vaults, we may need to reinstall Obsidian. (Alternatively, create a vault with the same name and run Discard local database to reset or uninstall Self-hosted LiveSync).

If the reason is not caused by IndexedDB: This case might be a bit harsh. Possibly the localStorage has run out in the phase, However, it might not affect the IndexedDB.

Therefore, could you please check the things in the following steps?

Sorry for your inconvenience.