vrtmrz / obsidian-livesync

MIT License
5.13k stars 167 forks source link

Obsidian crashes seconds after starting replication #491

Closed jorgementx closed 1 month ago

jorgementx commented 2 months ago

Abstract

Obsidian crashes short time after I start the replication process. I am trying to move all my obsidian livesync setup from one VPS provider to another. CouchDB is already working on docker and obsidian can connect to it. I also had to "Verify and Repair all files" and click on hundreds of files because the plugin said that those files where missing in the local database. Then I proceeded to replicate manually and the crash happened.

Expected behaviour

Actually happened

Reproducing procedure

  1. Run command Self-hosted LiveSync: Replicate now of click on the "Replicate" button in the left sidebar.
  2. Wait for some seconds.
  3. Black screen (While having devtools open, debugger stops execution with the message "Paused before potential out-of-memory crash". After continuing execution, the crash happens).

Report materials

Screenshots

unknown_2024 09 14-13 46_1

Other information, insights and intuition.

I'll be happy to provide more information if needed.

vrtmrz commented 2 months ago

Thank you for opening the issue! This should be a design flaw. Thanks to your information, it identified out-of-memory. I will be fixed at v0.22.23. However, to avoid this situation now, please disable Send chunks in bulk at Sync Settings->Performance tweaks on the setting dialogue for a workaround. Sorry for your inconvenience but thank you for your patience!

jorgementx commented 2 months ago

That worked! Thank you for your help and for answering so quickly.

By the way,

  1. Is there any advantage to turning that setting on apart from sending less packages over the network? Do you suggest to set it on when the fix is released? I don't have latency issues.
  2. Is there a way to ignore directories so they are not synced? I guess i could make them a hidden but i would rather not to if there's an alternative option. My secondary device it is trying to pull all the changes again and I don't really need the binaries in this device mainly because I already have them and replication is taking ages.

Thanks once again for the plugin too, I really like it.

vrtmrz commented 2 months ago

I am so relieved to hear that!

  1. The default setting will be disabled. (Unfortunately, it will not affect the migrated users). If you do not have the latency problem, and your vault once sent, it would not be so effective configuration. This feature has been made mostly for the first or larger replication. However, it indeed caused this situation. Ideally, we should be asked to use or not at the time for them. Finally, the default setting will not apply to either option.
  2. Yes, we can use Sync settings -> Target -> Non-synchronising files to determine the targets by regular expression.

I hope this helps to the honour you have given me!

jorgementx commented 2 months ago

Thanks a lot!

(Don't know if I should close the issue so I will leave that to you just in case)

vrtmrz commented 1 month ago

I am so sorry for being late! And so relieved to hear that!

Thank you for your kindness and respectfulness! Of course, you could close the issue!