Closed dlphnkck closed 7 months ago
Sorry.
I'll reformat it and repost them.
Sorry for being late!
Looks like we do not have enough space even to clean it up.
However, I think that we do not have to worry so much. We can rebuild databases. This will certainly free up more space in the database than a database clean-up. And, rebuilding the database should not affect existing files (assuming all devices are fully synchronised. However, if not, we should back the vault up in all devices).
The only thing that we will lose during the rebuild is a history of file editing.
We can rebuild the local database and the remote database in Rebuild everything
in the Maintain database
pane.
Could you please try rebuilding once?
Thanks for taking the time to reply.
"Rebuild everything" was done 9 months ago and it was documented to be done in 6 hours with 5 devices.
I think the number of notes has doubled since 9 months ago, but I'm going to run "Rebuild everything" now.
I hope you are not too sick as you seem to be getting a lot of requests. I hope everyone can do a better job of attaching the documents in advance so that the burden on Mr. vorotamoroz can be reduced. Thank you very much for your time and answer. I hope it will ease your burden as much as possible.
Sorry, "Rebuild everything" did not work.
The volume usage of CouchDB in Fly.io is now at 100%, so I tried to Rebuild everything 4 times on Windows and once from my iPad, but when I restarted the sync, the note changes were not reflected on the other devices.
enable "Write logs into the file",
go to Obsidian->Settings->Self-hosted LiveSync->Maintain databases tab->Click "Rebuild everything" button.
in Windows, press "Rebuild everything" 4 times. 1-1. I also got the "Lock remote database" popup in the top right corner of the screen.
Diary:2023/11/8 HH:mm:ss->Lock remote database to prevent data corruption
1-2. the following popup would sometimes appear in the upper right corner of the screen immediately after starting Obsidian.
Obsidian is indexing your vault... This should only happen once. Some functionality may not be available until this is complete. (1/233)
Since this is the same as last time, I will omit it.
Since this is the same as last time, I will omit it.
Since this is the same as last time, I will omit it.
Sorry. I forgot to pick it up and only saw it from the middle.
plugin:obsidian-livesync:22087 POST https://***.fly.dev/***/_bulk_docs 500
None.
None.
That is all. Sorry for the complication. Thank you for your time.
Thank you for your try!
6 hours
sounds a bit disconcerting, but I hope that it could be better in recent versions. (If not or it has gotten longer, please inform me. Actually, I suspect a bit so).
And, I appreciate your kindness! I am one of the happiest maintainers!
However, while writing the above in the draft, the situation seems to change again. Thanks to the detailed information, we had not missed the indication. CouchDB still refusing the request. Perhaps we have really little storage in the remote. Would you mind if I ask you to delete the remote database manually from the admin tool of CouchDB? We can access it in browser by https://example.com/_utils
Thank you for your help with this issue. I was able to successfully rebuild CouchDB.
The volume usage of Fly.io was 572MB right after I finished building CouchDB, but after synchronizing 5 devices, the volume usage of Fly.io was finally Used 1.01 GiB.
However, after running "Perform cleaning" from the Maintain databases tab, it temporarily increased from Used 1.01 GiB to Used 1.73 GiB, and then successfully decreased to Used 484 MB!
Thank you very much for your help.
Quote from the article [Obsidian] A closer look at Self-hosted LiveSync and data synchronization! (Dialogue 02) ๏ผSelf-hosted LiveSyncใจใใผใฟๅๆใซ่ฟซใ๏ผ (ๅฏพ่ซไผ็ป02)) 2022.09.20
It is recommended to periodically "Rebuild everything" to dump and rebuild the database contents. ๏ผๅฎๆ็ใซใRebuild everythingใใงใใผใฟใใผในใฎๅ ๅฎนใไธๆฆๆจใฆใฆๅๆง็ฏใใไบใๆจๅฅจใใฆใใ๏ผ
It is written that I should manually "Rebuild everything" periodically? ๏ผใจๆธใใใฆใใพใใใๅฎๆ็ใซๆๅใง"Rebuild everything"ใ่กใฃใๆนใใใใฎใงใใใใ๏ผ๏ผ
I learned my lesson this time and tried to see if I could use a Webhook to periodically notify Used in Volume Usage of CouchDB running on Fly.io, and now Fly.io is down, so I've been trying to get to...๐ญ
I am very sorry for the trouble you went through. It was very helpful. Thank you very much.
I am so relieved to hear that! I have seen your report and noticed that cleaning the database collects unused chunks on the server-side query, so that it may use extra storage temporarily. This may indicated as the 1.73GB-spike. However, to begin with, decreasing free space along newer devices getting synchronised is a little strange. Possibly there are some bugs around the conflict resolution or something. I will investigate it after this!
It is written that I should manually "Rebuild everything" periodically?
Yes, How often we should?
is the case depending on the files in our vault and the way of editing them, but it is true. Observing status - your idea - would be useful.
I learned my lesson this time and tried to see if I could use a Webhook to periodically notify Used in Volume Usage of CouchDB running on Fly.io, and now Fly.io is down, so I've been trying to get to...๐ญ
From Self-hosted LiveSync, we can see the usage in DryRun
of cleaning up. However, it may cause a spike.
Possibly It is good to be able to check the server status only.
Hello. Thank you for taking the time to reply. I understand the importance of periodically executing "Rebuild everything."
I can now comfortably use Obsidian on multiple devices and am once again very grateful for the availability of the LiveSync plugin. Thank you for your support.
I know you are busy, but please take care of yourself.
Hi! Thank you very much for your kindness! I am very honoured that your obsidian life is so awesome again. However, please do not hesitate to ask me. I will answer without overwork. I am trying to pace it in recently ๐๏ธ.
I am upset, so I apologize if my writing is clumsy.
Abstract
Expected behaviour
The local Obsidian file size is 200MB, so I hope it will be reduced to that size.
Actually happened
Reproducing procedure
I tried Perform cleaning on Remote databases (and Local databases) from the Maintain tab, but it failed.
Report materials
If the information is not available, do not hesitate to report it as it is. You can also of course omit it if you think this is indeed unnecessary. If it is necessary, I will ask you.
Report from the LiveSync
remote config
``` ----remote config---- cors: credentials: "true" origins: app://obsidian.md,capacitor://localhost,http://localhost chttpd: bind_address: any max_http_request_size: "4294967296" port: "5984" require_valid_user: "true" admins: ๐ ๐ธ๐ท๐ด๐ถ๐๐ธ๐ท vendor: name: The Apache Software Foundation feature_flags: partitioned||*: "true" chttpd_auth: hash_algorithms: sha256, sha require_valid_user: "true" indexers: couch_mrview: "true" prometheus: additional_port: "false" bind_address: 127.0.0.1 port: "17986" httpd: WWW-Authenticate: Basic realm="couchdb" bind_address: 127.0.0.1 enable_cors: "true" port: "5986" smoosh: state_dir: ./data couch_httpd_auth: authentication_db: ๐ ๐ธ๐ท๐ด๐ถ๐๐ธ๐ท secret: ๐ ๐ธ๐ท๐ด๐ถ๐๐ธ๐ท authentication_redirect: ๐ ๐ธ๐ท๐ด๐ถ๐๐ธ๐ท couchdb_engines: couch: couch_bt_engine couchdb: database_dir: ./data max_document_size: "50000000" uuid: ๐ ๐ธ๐ท๐ด๐ถ๐๐ธ๐ท view_index_dir: ./data ```Plug-in config
``` ---- Plug-in config --- version:0.20.6 couchDB_URI: self-hosted couchDB_USER: ๐ ๐ธ๐ท๐ด๐ถ๐๐ธ๐ท couchDB_PASSWORD: ๐ ๐ธ๐ท๐ด๐ถ๐๐ธ๐ท couchDB_DBNAME: ๐ ๐ธ๐ท๐ด๐ถ๐๐ธ๐ท liveSync: true syncOnSave: false syncOnStart: false savingDelay: 200 lessInformationInLog: false gcDelay: 0 versionUpFlash: "" minimumChunkSize: 20 longLineThreshold: 250 showVerboseLog: true suspendFileWatching: false trashInsteadDelete: false periodicReplication: false periodicReplicationInterval: 60 syncOnFileOpen: false encrypt: true passphrase: ๐ ๐ธ๐ท๐ด๐ถ๐๐ธ๐ท usePathObfuscation: false doNotDeleteFolder: false resolveConflictsByNewerFile: false batchSave: false deviceAndVaultName: "" usePluginSettings: false showOwnPlugins: false showStatusOnEditor: true usePluginSync: false autoSweepPlugins: false autoSweepPluginsPeriodic: false notifyPluginOrSettingUpdated: false checkIntegrityOnSave: false batch_size: 250 batches_limit: 40 useHistory: true disableRequestURI: true skipOlderFilesOnSync: true checkConflictOnlyOnOpen: true syncInternalFiles: true syncInternalFilesBeforeReplication: false syncInternalFilesIgnorePatterns: \/node_modules\/, \/\.git\/, \/obsidian-livesync\/,\/workspace$ ,\/workspace.json$ syncInternalFilesInterval: 60 additionalSuffixOfDatabaseName: "" ignoreVersionCheck: false lastReadUpdates: 19 deleteMetadataOfDeletedFiles: false syncIgnoreRegEx: "" syncOnlyRegEx: "" customChunkSize: 0 readChunksOnline: true watchInternalFileChanges: true automaticallyDeleteMetadataOfDeletedFiles: 0 disableMarkdownAutoMerge: false writeDocumentsIfConflicted: false useDynamicIterationCount: false syncAfterMerge: false configPassphraseStore: "" encryptedPassphrase: ๐ ๐ธ๐ท๐ด๐ถ๐๐ธ๐ท encryptedCouchDBConnection: ๐ ๐ธ๐ท๐ด๐ถ๐๐ธ๐ท permitEmptyPassphrase: false useIndexedDBAdapter: false useTimeouts: false writeLogToTheFile: false doNotPaceReplication: false hashCacheMaxCount: 300 hashCacheMaxAmount: 50 concurrencyOfReadChunksOnline: 100 minimumIntervalOfReadChunksOnline: 333 hashAlg: xxhash64 suspendParseReplicationResult: false doNotSuspendOnFetching: false useIgnoreFiles: false ignoreFiles: .gitignore syncOnEditorSave: false pluginSyncExtendedSetting: {} useV1: false workingUseDynamicIterationCount: false ```Obsidian debug info
Debug info
``` SYSTEM INFO: Obsidian version: v1.4.16 Installer version: v1.4.16 Operating system: Windows 10 Home 10.0.19045 Login status: not logged in Insider build toggle: off Live preview: off Legacy editor: off Base theme: dark Community theme: Minimal v7.2.3 Snippets enabled: 5 Restricted mode: off Plugins installed: 21 Plugins enabled: 18 1: Calendar v1.5.10 2: Commander v0.5.1 3: Excalidraw v1.9.26 4: Outliner v4.8.0 5: Plugin Update Tracker v1.5.2 6: ReadItLater v0.3.1 7: Self-hosted LiveSync v0.20.6 8: Templater v1.16.4 9: Various Complements v9.0.1 10: Vimrc Support v0.9.0 11: Search on Internet v0.5.0 12: Toggl Track v0.11.0 13: 2Hop Links Plus v0.37.0 14: Advanced URI v1.38.1 15: Version History Diff v2.1.9 16: Editing Toolbar v2.3.1 17: QuickAdd v1.4.0 18: Word Splitting for Simplified Chinese in Edit Mode and Vim Mode v1.10.0 ```Plug-in log
Sorry, I didn't know where the "Document box icon" was.
Network log
Screenshots
Chart of Volume Usage in Fly.io.![2023-10-27 Fly io Volume Usage Chart](https://github.com/vrtmrz/obsidian-livesync/assets/117900337/766f42d3-3324-470a-a77f-4c5577e1c988)
Other information, insights and intuition.
That is all. The questions are,
That is all.
I apologize for the length of this article. I was upset, so I know there is a lot of material missing . Please feel free to ask.
Thanks for reading.